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

Issue 169933002: WebGL: Don't destroy mailbox textures in the destructor until they're released. (Closed)

Created:
6 years, 10 months ago by dshwang
Modified:
6 years, 8 months ago
CC:
blink-reviews, jamesr, krit, dsinclair, jbroman, danakj, dglazkov+blink, Rik, adamk+blink_chromium.org, Stephen Chennney, aandrey+blink_chromium.org, pdr., rwlbuis, bajones, Zhenyao Mo
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

WebGL: Don't destroy mailbox textures in the destructor until they're released. This CL fixes the bug that WebGL makes the compositor get following gl error. [20074:20074:0317/145233:1532049594488:ERROR:gles2_cmd_decoder.cc(10071)] [.Compositor-0x731c2a2e9a0]GL ERROR :GL_INVALID_OPERATION : glConsumeTextureCHROMIUM: invalid mailbox name Currently, DrawingBuffer deletes all textures, even if some textures are used by the clients. This CL makes "release callback" be able to delete remaining textures even after the DrawingBuffer is destructed. This pattern is very similar to that used by accelerated 2d canvas and HW Video. See Canvas2DLayerBridge. TEST=DrawingBufferTest.verifyDestructionCompleteAfterAllMailboxesReleased, Reload http://browsertests.herokuapp.com/webgl/webglPerformance.html in all platforms. BUG=344393 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=172520

Patch Set 1 #

Total comments: 2

Patch Set 2 : Match the code pattern to Canvas2DLayerBridge #

Patch Set 3 : reimplement for ToT #

Patch Set 4 : Fix crash #

Total comments: 7

Patch Set 5 : Improve comment. make m_recycledMailboxQueue more succinct. #

Total comments: 2

Patch Set 6 : Define operator== in WebExternalTextureMailbox.h #

Patch Set 7 : Define operator!= also #

Total comments: 4

Patch Set 8 : define nameEquals() instead of operator== #

Patch Set 9 : rebase DrawingBufferTest to ToT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+189 lines, -30 lines) Patch
M Source/core/html/canvas/WebGLRenderingContextBase.cpp View 1 2 3 4 5 6 7 2 chunks +5 lines, -1 line 0 comments Download
M Source/platform/graphics/gpu/DrawingBuffer.h View 1 2 3 4 5 6 7 7 chunks +16 lines, -4 lines 0 comments Download
M Source/platform/graphics/gpu/DrawingBuffer.cpp View 1 2 3 4 5 6 7 11 chunks +80 lines, -23 lines 0 comments Download
M Source/platform/graphics/gpu/DrawingBufferTest.cpp View 1 2 3 4 5 6 7 8 7 chunks +83 lines, -2 lines 0 comments Download
M public/platform/WebExternalTextureMailbox.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
dshwang
Working in progress. This CL relieves following err msgs: [20400:20400:0217/223233:44920417703:ERROR:gles2_cmd_decoder.cc(10067)] [.Compositor-0x374d957f0c60]GL ERROR :GL_INVALID_OPERATION : glConsumeTextureCHROMIUM: ...
6 years, 10 months ago (2014-02-17 20:41:09 UTC) #1
Justin Novosad
https://codereview.chromium.org/169933002/diff/1/Source/core/html/canvas/WebGLRenderingContext.h File Source/core/html/canvas/WebGLRenderingContext.h (right): https://codereview.chromium.org/169933002/diff/1/Source/core/html/canvas/WebGLRenderingContext.h#newcode388 Source/core/html/canvas/WebGLRenderingContext.h:388: blink::WebGraphicsContext3D* m_context; IMHO: the ownership model would be clearer ...
6 years, 10 months ago (2014-02-18 18:07:33 UTC) #2
Ken Russell (switch to Gerrit)
Sorry but I think this is the wrong way of approaching this problem. Having the ...
6 years, 10 months ago (2014-02-18 18:35:27 UTC) #3
piman
On 2014/02/18 18:35:27, Ken Russell wrote: > Sorry but I think this is the wrong ...
6 years, 10 months ago (2014-02-18 19:28:18 UTC) #4
dshwang
On 2014/02/18 19:28:18, piman wrote: > On 2014/02/18 18:35:27, Ken Russell wrote: > > Sorry ...
6 years, 10 months ago (2014-02-18 20:45:54 UTC) #5
piman
On Tue, Feb 18, 2014 at 12:45 PM, <dongseong.hwang@intel.com> wrote: > On 2014/02/18 19:28:18, piman ...
6 years, 10 months ago (2014-02-18 20:54:53 UTC) #6
Justin Novosad
If we want to make sure the implementation is leak proof, we could always implement ...
6 years, 10 months ago (2014-02-18 21:05:23 UTC) #7
dshwang
Accelerated 2D Canvas already handles this situation. Canvas2DLayerBridge is destructed after all mailboxes are released. ...
6 years, 10 months ago (2014-02-19 19:38:32 UTC) #8
Justin Novosad
This change seems reasonable to me. It is analogous to the solution we shipped for ...
6 years, 10 months ago (2014-02-19 21:10:17 UTC) #9
Ken Russell (switch to Gerrit)
I'm sorry for holding up this review. If accelerated 2D canvas is already doing this, ...
6 years, 9 months ago (2014-03-04 03:21:10 UTC) #10
Ken Russell (switch to Gerrit)
Please send this out for re-review once the dependent CL https://codereview.chromium.org/163773007/ has re-landed. Thanks.
6 years, 9 months ago (2014-03-06 02:06:38 UTC) #11
dshwang
On 2014/03/06 02:06:38, Ken Russell wrote: > Please send this out for re-review once the ...
6 years, 8 months ago (2014-04-07 19:20:23 UTC) #12
Justin Novosad
https://codereview.chromium.org/169933002/diff/190001/Source/platform/graphics/gpu/DrawingBuffer.cpp File Source/platform/graphics/gpu/DrawingBuffer.cpp (right): https://codereview.chromium.org/169933002/diff/190001/Source/platform/graphics/gpu/DrawingBuffer.cpp#newcode541 Source/platform/graphics/gpu/DrawingBuffer.cpp:541: m_textureMailboxes.remove(j); I think this is unnecessary complexity. Wouldn't it ...
6 years, 8 months ago (2014-04-09 15:34:34 UTC) #13
dshwang
https://codereview.chromium.org/169933002/diff/190001/Source/platform/graphics/gpu/DrawingBuffer.cpp File Source/platform/graphics/gpu/DrawingBuffer.cpp (right): https://codereview.chromium.org/169933002/diff/190001/Source/platform/graphics/gpu/DrawingBuffer.cpp#newcode541 Source/platform/graphics/gpu/DrawingBuffer.cpp:541: m_textureMailboxes.remove(j); Thank you for review. As you mentioned, "nested ...
6 years, 8 months ago (2014-04-09 18:05:50 UTC) #14
Justin Novosad
On 2014/04/09 18:05:50, dshwang wrote: > https://codereview.chromium.org/169933002/diff/190001/Source/platform/graphics/gpu/DrawingBuffer.cpp > File Source/platform/graphics/gpu/DrawingBuffer.cpp (right): > > https://codereview.chromium.org/169933002/diff/190001/Source/platform/graphics/gpu/DrawingBuffer.cpp#newcode541 > ...
6 years, 8 months ago (2014-04-09 18:49:07 UTC) #15
Ken Russell (switch to Gerrit)
A few remaining concerns. https://codereview.chromium.org/169933002/diff/190001/Source/platform/graphics/gpu/DrawingBuffer.cpp File Source/platform/graphics/gpu/DrawingBuffer.cpp (right): https://codereview.chromium.org/169933002/diff/190001/Source/platform/graphics/gpu/DrawingBuffer.cpp#newcode541 Source/platform/graphics/gpu/DrawingBuffer.cpp:541: m_textureMailboxes.remove(j); On 2014/04/09 18:05:50, dshwang ...
6 years, 8 months ago (2014-04-15 02:24:01 UTC) #16
Ken Russell (switch to Gerrit)
BTW, I made some grammatical changes to the CL description. Hope that's OK.
6 years, 8 months ago (2014-04-15 02:25:36 UTC) #17
dshwang
Thank you for review! I'm OOO. I'll update this CL soon. On 2014/04/15 02:24:01, Ken ...
6 years, 8 months ago (2014-04-17 01:48:02 UTC) #18
dshwang
Hi, I tried to make code more clear. Could you review again? https://codereview.chromium.org/169933002/diff/210001/Source/platform/graphics/gpu/DrawingBuffer.cpp File Source/platform/graphics/gpu/DrawingBuffer.cpp ...
6 years, 8 months ago (2014-04-19 00:58:05 UTC) #19
Ken Russell (switch to Gerrit)
Thanks for pushing this through. LGTM with one request. https://codereview.chromium.org/169933002/diff/210001/Source/platform/graphics/gpu/DrawingBuffer.cpp File Source/platform/graphics/gpu/DrawingBuffer.cpp (right): https://codereview.chromium.org/169933002/diff/210001/Source/platform/graphics/gpu/DrawingBuffer.cpp#newcode87 Source/platform/graphics/gpu/DrawingBuffer.cpp:87: ...
6 years, 8 months ago (2014-04-20 00:27:41 UTC) #20
dshwang
On 2014/04/20 00:27:41, Ken Russell wrote: > Thanks for pushing this through. LGTM with one ...
6 years, 8 months ago (2014-04-22 09:50:54 UTC) #21
Ken Russell (switch to Gerrit)
Please hold off landing this for the moment. A memory management bug was just found ...
6 years, 8 months ago (2014-04-22 19:58:36 UTC) #22
dshwang
abarth@, could you review public/platform/WebExternalTextureMailbox.h ? A memory management bug is resolved.
6 years, 8 months ago (2014-04-24 09:06:26 UTC) #23
abarth-chromium
public/ rslgtm https://codereview.chromium.org/169933002/diff/250001/public/platform/WebExternalTextureMailbox.h File public/platform/WebExternalTextureMailbox.h (right): https://codereview.chromium.org/169933002/diff/250001/public/platform/WebExternalTextureMailbox.h#newcode49 public/platform/WebExternalTextureMailbox.h:49: return !memcmp(a.name, b.name, sizeof(a.name)); We don't need ...
6 years, 8 months ago (2014-04-24 14:59:05 UTC) #24
dshwang
Thank you for review. https://codereview.chromium.org/169933002/diff/250001/public/platform/WebExternalTextureMailbox.h File public/platform/WebExternalTextureMailbox.h (right): https://codereview.chromium.org/169933002/diff/250001/public/platform/WebExternalTextureMailbox.h#newcode49 public/platform/WebExternalTextureMailbox.h:49: return !memcmp(a.name, b.name, sizeof(a.name)); On ...
6 years, 8 months ago (2014-04-24 15:03:23 UTC) #25
danakj
https://codereview.chromium.org/169933002/diff/250001/public/platform/WebExternalTextureMailbox.h File public/platform/WebExternalTextureMailbox.h (right): https://codereview.chromium.org/169933002/diff/250001/public/platform/WebExternalTextureMailbox.h#newcode49 public/platform/WebExternalTextureMailbox.h:49: return !memcmp(a.name, b.name, sizeof(a.name)); On 2014/04/24 15:03:23, dshwang wrote: ...
6 years, 8 months ago (2014-04-24 15:10:01 UTC) #26
dshwang
https://codereview.chromium.org/169933002/diff/250001/public/platform/WebExternalTextureMailbox.h File public/platform/WebExternalTextureMailbox.h (right): https://codereview.chromium.org/169933002/diff/250001/public/platform/WebExternalTextureMailbox.h#newcode49 public/platform/WebExternalTextureMailbox.h:49: return !memcmp(a.name, b.name, sizeof(a.name)); nameEquals() looks better. It's why ...
6 years, 8 months ago (2014-04-24 15:19:10 UTC) #27
dshwang
The CQ bit was checked by dongseong.hwang@intel.com
6 years, 8 months ago (2014-04-24 15:43:33 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/169933002/290001
6 years, 8 months ago (2014-04-24 15:44:02 UTC) #29
commit-bot: I haz the power
6 years, 8 months ago (2014-04-24 16:52:28 UTC) #30
Message was sent while issue was closed.
Change committed as 172520

Powered by Google App Engine
This is Rietveld 408576698