RESOLVED FIXED 50189
[chromium] ContentLayerChromium shader should honor the platform Sk_x_SHIFT value instead of assuming BGRA color
https://bugs.webkit.org/show_bug.cgi?id=50189
Summary [chromium] ContentLayerChromium shader should honor the platform Sk_x_SHIFT v...
Grace Kloba
Reported 2010-11-29 16:40:43 PST
The shader in ContentLayerChromium assumes that color is in BGRA. It should honor the platform setting so that for the platform using RGBA, the color will be correct.
Attachments
patch (3.08 KB, patch)
2010-11-29 16:45 PST, Grace Kloba
no flags
Patch (3.04 KB, patch)
2010-11-29 17:28 PST, Grace Kloba
no flags
Patch (3.03 KB, patch)
2010-11-30 19:41 PST, Grace Kloba
kbr: review+
Grace Kloba
Comment 1 2010-11-29 16:45:25 PST
Kenneth Russell
Comment 2 2010-11-29 17:21:33 PST
Comment on attachment 75082 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=75082&action=review The code change looks fine (though the duplicated shader is a little unfortunate) but the OOPS line about no new tests needs to be removed and the patch regenerated or the commit queue will reject it. > WebCore/ChangeLog:8 > + No new tests. (OOPS!) This line needs to be deleted.
Grace Kloba
Comment 3 2010-11-29 17:28:07 PST
Kenneth Russell
Comment 4 2010-11-29 17:29:26 PST
Comment on attachment 75088 [details] Patch Looks good.
Vangelis Kokkevis
Comment 5 2010-11-29 17:31:56 PST
Comment on attachment 75088 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=75088&action=review > WebCore/platform/graphics/chromium/ContentLayerChromium.cpp:97 > + m_contentShaderProgram = createShaderProgram(m_context, vertexShaderString, SK_B32_SHIFT ? rgbaFragmentShaderString : bgraFragmentShaderString); As far as I can tell from SkColorPriv.h SK_B32_SHIFT is always non-zero, regardless of little or big endian. Did you mean to check SK_R32_SHIFT instead?
Grace Kloba
Comment 6 2010-11-29 17:40:31 PST
This is actually not for the big endian or little endian. In chrome/skia/config/SkUserConfig.h, it tries to set the packing to BGRA instead of the default RGBA. So if the platform uses SkUserConfig.h, it uses BGRA packing. If the platform doesn't use the SkUserConfig.h, it uses the default RGBA packing. (In reply to comment #5) > (From update of attachment 75088 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=75088&action=review > > > WebCore/platform/graphics/chromium/ContentLayerChromium.cpp:97 > > + m_contentShaderProgram = createShaderProgram(m_context, vertexShaderString, SK_B32_SHIFT ? rgbaFragmentShaderString : bgraFragmentShaderString); > > As far as I can tell from SkColorPriv.h SK_B32_SHIFT is always non-zero, regardless of little or big endian. Did you mean to check SK_R32_SHIFT instead?
Vangelis Kokkevis
Comment 7 2010-11-29 17:55:24 PST
(In reply to comment #6) > This is actually not for the big endian or little endian. In chrome/skia/config/SkUserConfig.h, it tries to set the packing to BGRA instead of the default RGBA. So if the platform uses SkUserConfig.h, it uses BGRA packing. If the platform doesn't use the SkUserConfig.h, it uses the default RGBA packing. > Ah, ok. Makes sense. Thanks. > (In reply to comment #5) > > (From update of attachment 75088 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=75088&action=review > > > > > WebCore/platform/graphics/chromium/ContentLayerChromium.cpp:97 > > > + m_contentShaderProgram = createShaderProgram(m_context, vertexShaderString, SK_B32_SHIFT ? rgbaFragmentShaderString : bgraFragmentShaderString); > > > > As far as I can tell from SkColorPriv.h SK_B32_SHIFT is always non-zero, regardless of little or big endian. Did you mean to check SK_R32_SHIFT instead?
WebKit Commit Bot
Comment 8 2010-11-29 21:14:47 PST
The commit-queue encountered the following flaky tests while processing attachment 75088 [details]: fast/workers/storage/use-same-database-in-page-and-workers.html http/tests/appcache/foreign-fallback.html Please file bugs against the tests. These tests were authored by ap@webkit.org and dumi@chromium.org. The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 9 2010-11-29 23:27:00 PST
Comment on attachment 75088 [details] Patch Rejecting patch 75088 from commit-queue. Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=eseidel-cq-sl', 'build', '--no-clean', '--no-update', '--build-style=both']" exit_code: 2 Last 500 characters of output: 86_64 c++ com.apple.compilers.gcc.4_2 CompileC /Projects/CommitQueue/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/IndentOutdentCommand.o /Projects/CommitQueue/WebCore/editing/IndentOutdentCommand.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 CompileC /Projects/CommitQueue/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/ImageDocument.o /Projects/CommitQueue/WebCore/html/ImageDocument.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 (21 failures) Full output: http://queues.webkit.org/results/6415104
Kenneth Russell
Comment 10 2010-11-30 10:37:30 PST
That build failure looks unrelated to this change. Trying again.
Grace Kloba
Comment 11 2010-11-30 17:37:51 PST
I do have a style change for this CL. If it is not committed yet, can I provide another patch?
Kenneth Russell
Comment 12 2010-11-30 18:10:17 PST
(In reply to comment #11) > I do have a style change for this CL. If it is not committed yet, can I provide another patch? Go ahead. It looks like the commit queue has not been running due to redness in the tree. I'll remove the cq+ and we can hope that the initial patch doesn't get landed; if it does, I'll deal with the merge by hand.
WebKit Commit Bot
Comment 13 2010-11-30 18:14:52 PST
The commit-queue encountered the following flaky tests while processing attachment 75088 [details]: fast/workers/storage/use-same-database-in-page-and-workers.html Please file bugs against the tests. These tests were authored by dumi@chromium.org. The commit-queue is continuing to process your patch.
Grace Kloba
Comment 14 2010-11-30 19:41:58 PST
Kenneth Russell
Comment 15 2010-12-01 11:11:17 PST
Comment on attachment 75244 [details] Patch Looks fine. I'm going to land this by hand.
Kenneth Russell
Comment 16 2010-12-01 11:14:01 PST
WebKit Review Bot
Comment 17 2010-12-01 12:00:19 PST
http://trac.webkit.org/changeset/73046 might have broken GTK Linux 32-bit Release The following tests are not passing: media/controls-drag-timebar.html
Kenneth Russell
Comment 18 2010-12-01 12:05:31 PST
There was a compiler warning on Mac OS X in the original patch that Darin helpfully fixed up in http://trac.webkit.org/changeset/73053 .
Note You need to log in before you can comment on or make changes to this bug.