RESOLVED FIXED82412
compositing/webgl/webgl-nonpremultiplied-blend.html is flaky on Lion
https://bugs.webkit.org/show_bug.cgi?id=82412
Summary compositing/webgl/webgl-nonpremultiplied-blend.html is flaky on Lion
Attachments
Patch (6.37 KB, patch)
2012-07-04 14:04 PDT, Kenneth Russell
no flags
Patch (6.09 KB, patch)
2012-07-10 18:41 PDT, Kenneth Russell
no flags
Dirk Pranke
Comment 1 2012-03-27 18:44:32 PDT
Note that there is a separate bug 55968 filed for this failing on mac and win in debug mode ...
Kenneth Russell
Comment 2 2012-03-28 14:11:55 PDT
From the flakiness dashboard results it looks to me like it's failing all the time rather than flaky. Needs investigation.
Dirk Pranke
Comment 3 2012-03-28 14:20:43 PDT
important note about the flakiness dashboard: if we retry the test and it passes, *that does not show up in the dashboard* :). That's a whole separate, confusing issue that I'm working on w/ Ojan.
Yasuhiro Matsuda
Comment 4 2012-07-03 16:25:55 PDT
Another bug was filed for Snow Leopard (https://bugs.webkit.org/show_bug.cgi?id=89998). This test started failing on Snow Leopard as well after http://trac.webkit.org/changeset/121267, so maybe this workaround (https://bugs.webkit.org/show_bug.cgi?id=79735) is causing this failure?
Kenneth Russell
Comment 5 2012-07-04 13:49:44 PDT
I think I see the problem. Because of how the premultiplied blend function of (ONE, ONE_MINUS_SRC_ALPHA) works, the premultipliedAlpha=false case for compositing of WebGL canvases is generally the first time the compositor will output anything except 1.0 for the alpha channel -- even when WebGL content is rendered with an alpha channel less than 1.0! A solution to this problem which seems correct to me is to disable writes to the alpha channel when drawing these canvases' output. This should cause the layout test results to be completely opaque on all platforms and fix any problems with weird content showing up blended behind them.
Kenneth Russell
Comment 6 2012-07-04 13:53:43 PDT
*** Bug 55968 has been marked as a duplicate of this bug. ***
Kenneth Russell
Comment 7 2012-07-04 14:04:50 PDT
Adrienne Walker
Comment 8 2012-07-10 11:31:46 PDT
Comment on attachment 150842 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=150842&action=review > Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp:1024 > + GLC(context(), context()->colorMask(true, true, true, false)); We used to do this for the opaque root layer, due to problems with native Windows controls having bad alpha values due to GDI. However, this caused performance problems on ChromeOS and Android (see bug 72452) and so we switched to using a shader that always output an alpha value of 1. I think glBlendFuncSeparate might be a better option here.
Kenneth Russell
Comment 9 2012-07-10 18:41:35 PDT
Kenneth Russell
Comment 10 2012-07-10 18:42:52 PDT
Redid patch in terms of blendFuncSeparate and re-tested. I have a feeling the CQ might reject this because the diff to LayoutTests/ChangeLog doesn't start at line 1, but I tried "git diff --precise" and it still didn't do the right thing.
Adrienne Walker
Comment 11 2012-07-10 20:05:57 PDT
Comment on attachment 151572 [details] Patch R=me.
WebKit Review Bot
Comment 12 2012-07-11 00:22:34 PDT
Comment on attachment 151572 [details] Patch Clearing flags on attachment: 151572 Committed r122306: <http://trac.webkit.org/changeset/122306>
WebKit Review Bot
Comment 13 2012-07-11 00:22:40 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.