REGRESSION (r202927): The internal size of the ImageBuffer is scaled twice by the...
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jul 2016 00:48:02 +0000 (00:48 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jul 2016 00:48:02 +0000 (00:48 +0000)
commit65f938075f587bf4784ffa1be87abcbcfdde04b0
treefe475f7ebf68923e6bafe1e0292e7ac6215f247c
parentbb126b8a8e4a1166df88b51cfa39f32c0f74d4ad
REGRESSION (r202927): The internal size of the ImageBuffer is scaled twice by the context scaleFactor
https://bugs.webkit.org/show_bug.cgi?id=159981
<rdar://problem/27429465>

Reviewed by Myles Maxfield.

Source/WebCore:

The change to propagate color spaces through ImageBuffers created an
alternate version of createCompatibleBuffer. This version accidentally
attempted to take the display resolution (i.e. hidpi) into account
when creating the buffer, which meant it was being applied twice.

The fix is simply to remove that logic. The caller of the method
will take the resolution into account, the same way they did
with the old createCompatibleBuffer method.

Test: fast/hidpi/pdf-image-scaled.html

* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::createCompatibleBuffer): Don't calculate
a resolution - just use the value of 1.0.

LayoutTests:

* fast/hidpi/pdf-image-scaled-expected.html: Added.
* fast/hidpi/pdf-image-scaled.html: Added.
* fast/hidpi/resources/circle.pdf: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/hidpi/pdf-image-scaled-expected.html [new file with mode: 0644]
LayoutTests/fast/hidpi/pdf-image-scaled.html [new file with mode: 0644]
LayoutTests/fast/hidpi/resources/circle.pdf [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp