[Webkit-unassigned] [Bug 50714] [Skia] Improve PNG compression by stripping the alpha channel when it's fully opaque

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


https://bugs.webkit.org/show_bug.cgi?id=50714


David Levin <levin at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #76848|review?, commit-queue?      |review-, commit-queue-
               Flag|                            |




--- Comment #8 from David Levin <levin at chromium.org>  2010-12-17 10:25:19 PST ---
(From update of attachment 76848)
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).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list