[webkit-reviews] review granted: [Bug 89246] [Cairo] do not multiply/demultiply colors when alpha is 255 : [Attachment 156120] new patch proposal

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 18 01:05:17 PDT 2012


Kenneth Rohde Christiansen <kenneth at webkit.org> has granted arno.
<arno at renevier.net>'s request for review:
Bug 89246: [Cairo] do not multiply/demultiply colors when alpha is 255
https://bugs.webkit.org/show_bug.cgi?id=89246

Attachment 156120: new patch proposal
https://bugs.webkit.org/attachment.cgi?id=156120&action=review

------- Additional Comments from Kenneth Rohde Christiansen
<kenneth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=156120&action=review


> Source/WebCore/ChangeLog:9
> +	   Do not use colorFromPremultipliedARGB in getImageData nor
> +	   premultipliedARGBFromColor in putByteArray. Avoiding object creation


Qt has a lot of such optimizations, worth have a look, though some might have
moved into Qt itself

> Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp:180
> +	       // We don't use Color::colorFromPremultipliedARGB() here because

> +	       // one function call per pixel is just too expensive:
> +	       // On standard 200x400 canvas for example, 80000 calls each
time.

// Avoid calling Color::colorFromPremultipliedARGB() per pixel for performance
reasons.


More information about the webkit-reviews mailing list