Fix nonpremultiplied webgl toDataURL to jpeg
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Sep 2011 22:23:28 +0000 (22:23 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Sep 2011 22:23:28 +0000 (22:23 +0000)
commit69e8c58233adf559818372eefa161515e7bf89a0
tree6938708cebca67a0d465e0572089a96ef4222c7f
parent48d99cd56d44faeb421b95df8af5f333cca99b37
Fix nonpremultiplied webgl toDataURL to jpeg
https://bugs.webkit.org/show_bug.cgi?id=68366

Source/WebCore:

The canvas spec says that toDataURL to formats without an alpha must
be "composited onto a solid black background using the source-over
operator." Do that.

Patch by John Bauman <jbauman@chromium.org> on 2011-09-19
Reviewed by Kenneth Russell.

* platform/image-encoders/skia/JPEGImageEncoder.cpp:
(WebCore::RGBAtoRGB):

LayoutTests:

Update the premultiplyalpha-test from the WebGL conformance tests.

Patch by John Bauman <jbauman@chromium.org> on 2011-09-19
Reviewed by Kenneth Russell.

* fast/canvas/webgl/premultiplyalpha-test-expected.txt:
* fast/canvas/webgl/premultiplyalpha-test.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/canvas/webgl/premultiplyalpha-test-expected.txt
LayoutTests/fast/canvas/webgl/premultiplyalpha-test.html
Source/WebCore/ChangeLog
Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp