New issue
Advanced search Search tips

Issue 725919 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Jul 27
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[OffscreenCanvas] GPU-accelerated code path does not recycle Mailboxes

Project Member Reported by junov@chromium.org, May 24 2017

Issue description

In OffscreenCanvasFrameDispatcherImpl:: SetTransferableResourceToStaticBitmapImage, there is an opportunity to avoid re creating new mailboxes at each animation frame by tracking the mailboxes associated with textures that were recycled by skia.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/700edb258c537f581d941667fa5c20ef48f268e2

commit 700edb258c537f581d941667fa5c20ef48f268e2
Author: Justin Novosad <junov@chromium.org>
Date: Thu Aug 24 16:34:34 2017

Re-use texture mailboxes for textures recycled by skia in blink.

This change adds a cache that stores associations between GrTexture*
and mailbox names. That way, it is not necessary to re-generate
a mailbox for a GrTexture that was recycled by skia. Entries in
the cache get removed when the associated GrTexture is destroyed.
This optimization affects 2D canvas contexts.

The cache lookup is about 5 times faster that re-generating a mailbox.

Another optimization in this change is that the new centralized
mailboxing code produces unverified sync tokens instead of verified
ones. This should save synchronous IPCs costing >300 microseconds in
a few cases.  Cases that do require verification will get lazily
verified in ResourceProvider::PrepareSendToParent(). These lazy
verifications should also be faster than before in cases where there
are multiple canvases because the batched verifications will only
require a single IPC for all canvases.

BUG= 725919 
TBR=bajones@chromium.org

Change-Id: Ibe43d1320e8fc548a5a84397ba4d231a031f0bb7
Reviewed-on: https://chromium-review.googlesource.com/602679
Commit-Queue: Justin Novosad <junov@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Reviewed-by: Xida Chen <xidachen@chromium.org>
Reviewed-by: Fernando Serboncini <fserb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497079}
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasTest.cpp
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.h
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/GraphicsTypes.h
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/MailboxTextureHolder.cpp
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/MailboxTextureHolder.h
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/OffscreenCanvasResourceProvider.cpp
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/SkiaTextureHolder.cpp
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/SkiaTextureHolder.h
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/TextureHolder.h
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/WebGraphicsContext3DProviderWrapper.h
[add] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/gpu/GraphicsContext3DUtils.cpp
[add] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/gpu/GraphicsContext3DUtils.h
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/gpu/ImageLayerBridge.cpp
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h
[modify] https://crrev.com/700edb258c537f581d941667fa5c20ef48f268e2/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContextTest.cpp

Owner: ----
Status: Available (was: Assigned)
Status: WontFix (was: Available)
This got fixed indirectly by the CanvasResource refactor.

Sign in to add a comment