[webkit-reviews] review denied: [Bug 50714] [Skia] Improve PNG compression by stripping the alpha channel when it's fully opaque : [Attachment 76848] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 17 10:25:18 PST 2010


David Levin <levin at chromium.org> has denied Cosmin Truta
<ctruta at chromium.org>'s request for review:
Bug 50714: [Skia] Improve PNG compression by stripping the alpha channel when
it's fully opaque
https://bugs.webkit.org/show_bug.cgi?id=50714

Attachment 76848: Patch
https://bugs.webkit.org/attachment.cgi?id=76848&action=review

------- Additional Comments from David Levin <levin at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=76848&action=review

One bug to fix and a few things to consider.

> WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp:55
> +	   inputBitmap.setPixels(const_cast<unsigned char*>(input));

s/input/row/

Would be nice to improve the test to catch this bug.  

Seems like accidentally using the first row again and again could be an easier
mistake to make.

> WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp:67
> +static void preMultipliedBGRAtoRGB(const unsigned char* input, int
numberOfPixels, unsigned char* output)

consider calling "input" "row" so that the code stays similar looking in these
three places.

> WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp:85
> +static void preMultipliedBGRAtoRGBA(const unsigned char* input, int
numberOfPixels, unsigned char* output)

Consider changing "input" to "row" (same as above).


More information about the webkit-reviews mailing list