Bug 84682

Summary: [chromium-android] Dump Image in RGBA order with a checksum.
Product: WebKit Reporter: Johnny(Jianning) Ding <jnd>
Component: Tools / TestsAssignee: Johnny(Jianning) Ding <jnd>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: abarth, tkent, tony, webkit.review.bot, zhenghao
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Android   
OS: Unspecified   
Attachments:
Description Flags
patch v1 tkent: review+

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 ***