Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(977)

Issue 2261623002: Make DrawingBuffer and Canvas2DLayerBridge be cc::TextureLayerClients. (Closed)

Created:
4 years, 4 months ago by danakj
Modified:
4 years, 4 months ago
CC:
ajuma+watch-canvas_chromium.org, ajuma+watch_chromium.org, blink-reviews, blink-reviews-api_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, cc-bugs_chromium.org, chromium-reviews, danakj+watch_chromium.org, darin-cc_chromium.org, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, enne (OOO), f(malita), haraken, jam, jbroman, jochen+watch_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, pdr+graphicswatchlist_chromium.org, piman+watch_chromium.org, piman, rwlbuis, Stephen Chennney
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make DrawingBuffer and Canvas2DLayerBridge be cc::TextureLayerClients. This eliminates the following classes: - WebExternalTextureMailbox (use cc::TextureMailbox and cc::SingleReleaseCallback directly now) - WebExternalTextureLayerClient (use cc::TextureLayerClient directly) - WebExternalBitmapImpl (use cc::SharedBitmap and friends directly) While using SingleReleaseCallback, it became clear that some calls to prepareMailbox were never calling releaseMailbox, causing the texture to be kept alive forever (and the DrawingBuffer with it), leaking memory. Fixing this lead to a large rewrite of the "transferToImageBitmap()" implementation, which hopefully is simpler about its intentions and does less work switching between mailboxes and SkImages. R=kbr, piman, xidachen, junov, pdr, tkent BUG=606056 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/b164441d329b1260970621adbe9046ee79917aea Cr-Commit-Position: refs/heads/master@{#413555}

Patch Set 1 #

Patch Set 2 : webmailbox: quick compile fix #

Patch Set 3 : webmailbox: rebase #

Patch Set 4 : webmailbox: mac #

Patch Set 5 : webmailbox: andsoftwarewebgl #

Total comments: 3

Patch Set 6 : webmailbox: windows-exports #

Total comments: 11

Patch Set 7 : webmailbox: oopsnamespace #

Total comments: 4

Patch Set 8 : webmailbox: saveskimage-useskssp #

Patch Set 9 : webmailbox: add-todo-about-extra-mailboxing #

Total comments: 9

Patch Set 10 : webmailbox: remove-gen-wait-sync-tokens #

Patch Set 11 : webmailbox: fix-dcheck-for-OffscreenCanvas-2d-pattern-in-worker.html #

Patch Set 12 : webmailbox: fix-passrefptr #

Unified diffs Side-by-side diffs Delta from patch set Stats (+667 lines, -833 lines) Patch
M cc/blink/BUILD.gn View 1 chunk +0 lines, -2 lines 0 comments Download
M cc/blink/web_compositor_support_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/blink/web_compositor_support_impl.cc View 2 chunks +1 line, -2 lines 0 comments Download
D cc/blink/web_external_bitmap_impl.h View 1 chunk +0 lines, -51 lines 0 comments Download
D cc/blink/web_external_bitmap_impl.cc View 1 chunk +0 lines, -52 lines 0 comments Download
M cc/blink/web_external_texture_layer_impl.h View 1 2 3 4 2 chunks +3 lines, -36 lines 0 comments Download
M cc/blink/web_external_texture_layer_impl.cc View 1 2 3 4 2 chunks +2 lines, -90 lines 0 comments Download
M components/test_runner/test_plugin.h View 1 chunk +0 lines, -3 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 3 chunks +0 lines, -9 lines 0 comments Download
M content/renderer/renderer_blink_platform_impl.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/renderer_blink_platform_impl.cc View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/ImageBitmap.h View 3 chunks +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/frame/ImageBitmap.cpp View 3 chunks +0 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp View 1 chunk +1 line, -14 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.h View 1 2 3 4 5 6 7 1 chunk +36 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +84 lines, -98 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h View 1 2 3 4 5 7 chunks +16 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp View 1 2 3 13 chunks +55 lines, -41 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp View 1 2 3 4 7 chunks +39 lines, -40 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/DEPS View 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp View 4 chunks +14 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h View 1 2 3 4 5 6 10 chunks +54 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp View 1 2 3 4 5 6 7 8 9 14 chunks +176 lines, -75 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp View 15 chunks +136 lines, -128 lines 0 comments Download
M third_party/WebKit/Source/wtf/DequeTest.cpp View 1 2 3 4 1 chunk +29 lines, -0 lines 0 comments Download
M third_party/WebKit/public/blink_headers.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/public/platform/Platform.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/WebCompositorSupport.h View 3 chunks +2 lines, -2 lines 0 comments Download
D third_party/WebKit/public/platform/WebExternalTextureLayerClient.h View 1 chunk +0 lines, -55 lines 0 comments Download
D third_party/WebKit/public/platform/WebExternalTextureMailbox.h View 1 chunk +0 lines, -61 lines 0 comments Download

Messages

Total messages: 82 (58 generated)
danakj
Hi! May I please get a review of the following? xidachen: The most interesting bits ...
4 years, 4 months ago (2016-08-19 19:49:12 UTC) #26
danakj
Oh, and pdr: public/
4 years, 4 months ago (2016-08-19 19:49:25 UTC) #27
danakj
https://codereview.chromium.org/2261623002/diff/80001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp (left): https://codereview.chromium.org/2261623002/diff/80001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp#oldcode649 third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp:649: WebExternalTextureMailbox mailbox; This code moved into DrawingBuffer because using ...
4 years, 4 months ago (2016-08-19 19:51:03 UTC) #28
danakj
https://codereview.chromium.org/2261623002/diff/80001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp File third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp (right): https://codereview.chromium.org/2261623002/diff/80001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp#newcode288 third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp:288: if (useSharedMemory) { I verified the hardware paths but ...
4 years, 4 months ago (2016-08-19 19:54:30 UTC) #29
pdr.
On 2016/08/19 at 19:49:25, danakj wrote: > Oh, and > > pdr: public/ LGTM for ...
4 years, 4 months ago (2016-08-19 20:00:05 UTC) #30
Justin Novosad
https://codereview.chromium.org/2261623002/diff/100001/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp File third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp (right): https://codereview.chromium.org/2261623002/diff/100001/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp#newcode98 third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp:98: return fromSkSp(SkImage::MakeFromAdoptedTexture(sharedGrContext, backendTexture)); Would it be useful to set ...
4 years, 4 months ago (2016-08-19 21:51:19 UTC) #51
danakj
https://codereview.chromium.org/2261623002/diff/100001/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp File third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp (right): https://codereview.chromium.org/2261623002/diff/100001/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp#newcode98 third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp:98: return fromSkSp(SkImage::MakeFromAdoptedTexture(sharedGrContext, backendTexture)); On 2016/08/19 21:51:18, Justin Novosad wrote: ...
4 years, 4 months ago (2016-08-19 21:57:57 UTC) #52
danakj
PTAL https://codereview.chromium.org/2261623002/diff/100001/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp File third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp (right): https://codereview.chromium.org/2261623002/diff/100001/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp#newcode98 third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp:98: return fromSkSp(SkImage::MakeFromAdoptedTexture(sharedGrContext, backendTexture)); On 2016/08/19 21:57:57, danakj wrote: ...
4 years, 4 months ago (2016-08-19 22:06:21 UTC) #53
piman
LGTM overall, one question. https://codereview.chromium.org/2261623002/diff/120001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp File third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp (right): https://codereview.chromium.org/2261623002/diff/120001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp#newcode423 third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp:423: // buffer (which was returned ...
4 years, 4 months ago (2016-08-19 22:30:21 UTC) #56
danakj
https://codereview.chromium.org/2261623002/diff/120001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp File third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp (right): https://codereview.chromium.org/2261623002/diff/120001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp#newcode423 third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp:423: // buffer (which was returned from PrepareTextureMailbox()). On 2016/08/19 ...
4 years, 4 months ago (2016-08-19 22:37:18 UTC) #57
danakj
https://codereview.chromium.org/2261623002/diff/120001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp File third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp (right): https://codereview.chromium.org/2261623002/diff/120001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp#newcode423 third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp:423: // buffer (which was returned from PrepareTextureMailbox()). On 2016/08/19 ...
4 years, 4 months ago (2016-08-19 22:43:03 UTC) #58
piman
lgtm https://codereview.chromium.org/2261623002/diff/120001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp File third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp (right): https://codereview.chromium.org/2261623002/diff/120001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp#newcode423 third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp:423: // buffer (which was returned from PrepareTextureMailbox()). On ...
4 years, 4 months ago (2016-08-19 23:11:35 UTC) #61
danakj
https://codereview.chromium.org/2261623002/diff/100001/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp File third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp (right): https://codereview.chromium.org/2261623002/diff/100001/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp#newcode98 third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp:98: return fromSkSp(SkImage::MakeFromAdoptedTexture(sharedGrContext, backendTexture)); On 2016/08/19 21:51:18, Justin Novosad wrote: ...
4 years, 4 months ago (2016-08-20 01:13:30 UTC) #64
danakj
https://codereview.chromium.org/2261623002/diff/100001/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp File third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp (right): https://codereview.chromium.org/2261623002/diff/100001/third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp#newcode98 third_party/WebKit/Source/platform/graphics/AcceleratedStaticBitmapImage.cpp:98: return fromSkSp(SkImage::MakeFromAdoptedTexture(sharedGrContext, backendTexture)); On 2016/08/20 01:13:30, danakj wrote: > ...
4 years, 4 months ago (2016-08-20 01:26:18 UTC) #65
Ken Russell (switch to Gerrit)
Thanks very much Dana for working on cleaning up this code and in particular for ...
4 years, 4 months ago (2016-08-20 03:54:01 UTC) #70
tkent
Updating wtf/DequeTest.cpp in this CL looks weird a little bit because it is not related ...
4 years, 4 months ago (2016-08-21 23:13:02 UTC) #71
danakj
On 2016/08/21 23:13:02, tkent wrote: > Updating wtf/DequeTest.cpp in this CL looks weird a little ...
4 years, 4 months ago (2016-08-22 17:56:17 UTC) #72
danakj
https://codereview.chromium.org/2261623002/diff/150001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp File third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp (right): https://codereview.chromium.org/2261623002/diff/150001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp#newcode251 third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp:251: --it; // Removed this position so iterate on it ...
4 years, 4 months ago (2016-08-22 18:45:25 UTC) #73
danakj
https://codereview.chromium.org/2261623002/diff/150001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp File third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp (right): https://codereview.chromium.org/2261623002/diff/150001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp#newcode425 third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp:425: // avoid this whole dance of wait for sync ...
4 years, 4 months ago (2016-08-22 19:01:04 UTC) #74
Ken Russell (switch to Gerrit)
Thanks again for cleaning this up and for our offline discussion. LGTM https://codereview.chromium.org/2261623002/diff/150001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp File third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp ...
4 years, 4 months ago (2016-08-22 19:03:11 UTC) #75
Justin Novosad
lgtm
4 years, 4 months ago (2016-08-22 19:21:01 UTC) #76
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2261623002/210001
4 years, 4 months ago (2016-08-22 19:48:13 UTC) #79
commit-bot: I haz the power
Committed patchset #12 (id:210001)
4 years, 4 months ago (2016-08-22 22:30:44 UTC) #80
commit-bot: I haz the power
4 years, 4 months ago (2016-08-22 22:33:15 UTC) #82
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/b164441d329b1260970621adbe9046ee79917aea
Cr-Commit-Position: refs/heads/master@{#413555}

Powered by Google App Engine
This is Rietveld 408576698