Bug 88613 - [chromium] WEBP image blue and red color channels reversed on Android
Summary: [chromium] WEBP image blue and red color channels reversed on Android
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: noel gordon
URL: https://developers.google.com/speed/w...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-07 21:25 PDT by noel gordon
Modified: 2012-06-08 01:50 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.63 KB, patch)
2012-06-07 22:06 PDT, noel gordon
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description noel gordon 2012-06-07 21:25:39 PDT
The JPEG images (on the left) on this URL, and the WEBP images (right), should look identical.  On Chrome Android, the red and blue channels are reversed.
Comment 1 noel gordon 2012-06-07 21:30:46 PDT
Skia android is LITTLE_ENDIAN, but it stores pixels RGBA, see https://bugs.webkit.org/show_bug.cgi?id=75861#c6
Comment 2 noel gordon 2012-06-07 22:06:19 PDT
Created attachment 146476 [details]
Patch
Comment 3 noel gordon 2012-06-07 22:18:21 PDT
http://b/6311532
Comment 4 noel gordon 2012-06-07 22:31:52 PDT
Tools/Scripts/new-run-webkit-tests --chromium --release fast/images/webp-image-decoding.html

Works for me locally.
Comment 5 Kent Tamura 2012-06-07 22:35:16 PDT
Comment on attachment 146476 [details]
Patch

rubber stamped.
Comment 6 Pascal Massimino 2012-06-07 23:23:54 PDT
shouldn't the test be on "SK_A32_SHIFT"  instead of "SK_B32_SHIFT" ?
Comment 7 noel gordon 2012-06-07 23:29:41 PDT
BGRA and RGBA -> the A shift is identical on a little-endian CPU, right?
Comment 8 noel gordon 2012-06-07 23:43:56 PDT
Or for example, see bug 78540
Comment 9 Pascal Massimino 2012-06-08 00:17:50 PDT
i'm fine with either ways, it's just that i saw the test being

#ifndef SK_A32_SHIFT

...

#endif


at skia/include/core/SkPostConfig.h:165

your pick!
Comment 10 noel gordon 2012-06-08 00:40:53 PDT
Yes it's a little confusing, but but 78540 is your friend.
Comment 11 WebKit Review Bot 2012-06-08 00:42:58 PDT
Comment on attachment 146476 [details]
Patch

Clearing flags on attachment: 146476

Committed r119807: <http://trac.webkit.org/changeset/119807>
Comment 12 WebKit Review Bot 2012-06-08 00:43:03 PDT
All reviewed patches have been landed.  Closing bug.
Comment 13 Pascal Massimino 2012-06-08 00:46:30 PDT
Fine with me, if just for the (important) sake of coherency.

Thanks for fixing this Noel!
Comment 14 noel gordon 2012-06-08 01:50:24 PDT
No worries.