[Cairo] Canvas putImageData is not working as expected
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Aug 2013 06:48:42 +0000 (06:48 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Aug 2013 06:48:42 +0000 (06:48 +0000)
commit77a445b8f5ff60fae2c8cd9b2c4440374f4a4d19
treed23987ffdd8f73e7e80f509741a2d6fb2cdbbb84
parentd8852186882c4b64cca47632bea4a61dff8534e1
[Cairo] Canvas putImageData is not working as expected
https://bugs.webkit.org/show_bug.cgi?id=119992

Patch by Hurnjoo Lee <hurnjoo.lee@samsung.com> on 2013-08-19
Reviewed by Darin Adler.

Source/WebCore:

ImageBufferCairo::putImageArray didn't perform pre-multiply in case of zero alpha value.
If the alpha value is not 255, image data should always be pre-multiplied.

Test: fast/canvas/canvas-putImageData-zero-alpha.html

* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::putByteArray):

LayoutTests:

Add a ref test that ensures that putImageData of canvas with zero alpha work correctly.

* fast/canvas/canvas-putImageData-zero-alpha-expected.html: Added.
* fast/canvas/canvas-putImageData-zero-alpha.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/canvas/canvas-putImageData-zero-alpha-expected.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-putImageData-zero-alpha.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp