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

Issue 1315233003: WebGL's SVGImage buffer should be cleared (Closed)

Created:
5 years, 3 months ago by f(malita)
Modified:
5 years, 3 months ago
CC:
blink-reviews, reed1
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

WebGL's SVGImage buffer should be cleared When building SVG image-backed WebGL textures, we're currently drawing into a reusable buffer. Since SVG images are not guaranteed to be opaque, we should clear the buffer as needed. Update the existing test to cover this logic (the updated version fails at ToT but passes with the patch). Also reactivate the imageForRender null-check (ineffective after http://crrev.com/29203004), and change drawImageIntoBuffer() to take a ref instead of a raw ptr. TEST=fast/canvas/webgl/tex-image-and-sub-image-2d-with-svg-image.html BUG=500180 R=kbr@chromium.org,pdr@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201929

Patch Set 1 #

Patch Set 2 : todo comment #

Patch Set 3 : updated results #

Total comments: 5

Patch Set 4 : review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -23 lines) Patch
M LayoutTests/fast/canvas/webgl/resources/tex-image-and-sub-image-2d-with-svg-image.js View 4 chunks +31 lines, -12 lines 0 comments Download
A + LayoutTests/fast/canvas/webgl/resources/transparent-green.svg View 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-svg-image-expected.txt View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M Source/modules/webgl/WebGLRenderingContextBase.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/webgl/WebGLRenderingContextBase.cpp View 1 2 3 4 chunks +14 lines, -5 lines 0 comments Download

Messages

Total messages: 13 (3 generated)
f(malita)
5 years, 3 months ago (2015-09-08 15:31:05 UTC) #1
pdr.
https://codereview.chromium.org/1315233003/diff/40001/Source/modules/webgl/WebGLRenderingContextBase.cpp File Source/modules/webgl/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/1315233003/diff/40001/Source/modules/webgl/WebGLRenderingContextBase.cpp#newcode4140 Source/modules/webgl/WebGLRenderingContextBase.cpp:4140: if (!image->currentFrameKnownToBeOpaque()) Why wasn't this needed for transparent animated ...
5 years, 3 months ago (2015-09-08 18:33:58 UTC) #2
f(malita)
https://codereview.chromium.org/1315233003/diff/40001/Source/modules/webgl/WebGLRenderingContextBase.cpp File Source/modules/webgl/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/1315233003/diff/40001/Source/modules/webgl/WebGLRenderingContextBase.cpp#newcode4140 Source/modules/webgl/WebGLRenderingContextBase.cpp:4140: if (!image->currentFrameKnownToBeOpaque()) On 2015/09/08 18:33:58, pdr wrote: > Why ...
5 years, 3 months ago (2015-09-08 18:44:45 UTC) #3
pdr.
On 2015/09/08 at 18:44:45, fmalita wrote: > https://codereview.chromium.org/1315233003/diff/40001/Source/modules/webgl/WebGLRenderingContextBase.cpp > File Source/modules/webgl/WebGLRenderingContextBase.cpp (right): > > https://codereview.chromium.org/1315233003/diff/40001/Source/modules/webgl/WebGLRenderingContextBase.cpp#newcode4140 ...
5 years, 3 months ago (2015-09-08 18:47:36 UTC) #4
Ken Russell (switch to Gerrit)
Thanks for this fix. LGTM with one minor comment. https://codereview.chromium.org/1315233003/diff/40001/LayoutTests/fast/canvas/webgl/resources/tex-image-and-sub-image-2d-with-svg-image.js File LayoutTests/fast/canvas/webgl/resources/tex-image-and-sub-image-2d-with-svg-image.js (right): https://codereview.chromium.org/1315233003/diff/40001/LayoutTests/fast/canvas/webgl/resources/tex-image-and-sub-image-2d-with-svg-image.js#newcode12 LayoutTests/fast/canvas/webgl/resources/tex-image-and-sub-image-2d-with-svg-image.js:12: ...
5 years, 3 months ago (2015-09-08 19:34:01 UTC) #6
f(malita)
https://codereview.chromium.org/1315233003/diff/40001/Source/modules/webgl/WebGLRenderingContextBase.cpp File Source/modules/webgl/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/1315233003/diff/40001/Source/modules/webgl/WebGLRenderingContextBase.cpp#newcode4131 Source/modules/webgl/WebGLRenderingContextBase.cpp:4131: ASSERT(image); On 2015/09/08 19:34:01, Ken Russell wrote: > If ...
5 years, 3 months ago (2015-09-08 19:51:42 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1315233003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1315233003/60001
5 years, 3 months ago (2015-09-08 19:51:55 UTC) #10
Zhenyao Mo
On 2015/09/08 19:34:01, Ken Russell wrote: > Thanks for this fix. LGTM with one minor ...
5 years, 3 months ago (2015-09-08 20:07:24 UTC) #11
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://src.chromium.org/viewvc/blink?view=rev&revision=201929
5 years, 3 months ago (2015-09-08 21:17:07 UTC) #12
Ken Russell (switch to Gerrit)
5 years, 3 months ago (2015-09-08 21:20:35 UTC) #13
Message was sent while issue was closed.
On 2015/09/08 20:07:24, Zhenyao Mo wrote:
> On 2015/09/08 19:34:01, Ken Russell wrote:
> > Thanks for this fix. LGTM with one minor comment.
> > 
> >
>
https://codereview.chromium.org/1315233003/diff/40001/LayoutTests/fast/canvas...
> > File
> >
>
LayoutTests/fast/canvas/webgl/resources/tex-image-and-sub-image-2d-with-svg-image.js
> > (right):
> > 
> >
>
https://codereview.chromium.org/1315233003/diff/40001/LayoutTests/fast/canvas...
> >
>
LayoutTests/fast/canvas/webgl/resources/tex-image-and-sub-image-2d-with-svg-image.js:12:
> > var poisonImageLoaded = false;
> > zmo: we should port these changes to the WebGL conformance suite.
> 
> Noted.  I will add this to my TODO list.

Thanks. I filed https://github.com/KhronosGroup/WebGL/issues/1193 to track it.

Powered by Google App Engine
This is Rietveld 408576698