Bug 84682 - [chromium-android] Dump Image in RGBA order with a checksum.
Summary: [chromium-android] Dump Image in RGBA order with a checksum.
Status: RESOLVED DUPLICATE of bug 86040
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Android Unspecified
: P2 Normal
Assignee: Johnny(Jianning) Ding
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-24 01:42 PDT by Johnny(Jianning) Ding
Modified: 2012-05-09 17:30 PDT (History)
5 users (show)

See Also:


Attachments
patch v1 (3.80 KB, patch)
2012-04-24 09:25 PDT, Johnny(Jianning) Ding
tkent: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Johnny(Jianning) Ding 2012-04-24 01:42:26 PDT
On Chromium Android, pixel layout encoding is RGBA, however, other Chrome platforms use BGRA. We need to correctly dump the image with RGBA encoding and reorder the layout of pixels to calculate the checksum in order to match the checksum of other Chrome platforms.
Comment 1 Johnny(Jianning) Ding 2012-04-24 09:25:43 PDT
Created attachment 138576 [details]
patch v1
Comment 2 Kent Tamura 2012-04-24 17:59:16 PDT
Comment on attachment 138576 [details]
patch v1

View in context: https://bugs.webkit.org/attachment.cgi?id=138576&action=review

This change is acceptable.

However
 - introduce webkit_support::EncodeRGBAPNGWithChecksum(), and
 - Make re-ordered bytes on the fly and pour it to MD5 digester
would be better for performance.

> Tools/DumpRenderTree/chromium/TestShell.cpp:674
> +    WTF::MD5 digester;
> +    WTF::Vector<uint8_t, 16> digestValue;

You don't need to add WTF::.

> Tools/DumpRenderTree/chromium/TestShell.cpp:685
> +    WTF::Vector<SkPMColor> pixelsInBGRAOrder;

ditto.

> Tools/DumpRenderTree/chromium/TestShell.cpp:688
> +        SkPMColor* srcRow = reinterpret_cast<SkPMColor*>(sourceBitmap.getAddr32(0, y));

nit: The variable name should be sourceRow for consistency.
Comment 3 Adam Barth 2012-05-09 17:30:24 PDT

*** This bug has been marked as a duplicate of bug 86040 ***