Subpixel rendering: Enable compositing RenderLayer painting on device pixel position.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Feb 2014 23:04:20 +0000 (23:04 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Feb 2014 23:04:20 +0000 (23:04 +0000)
commit41b49c286ac66a19663676e5913133395610dd86
tree2f14c3235da000083864e637d6226fe49dee27c2
parenta3ee87b3ce62be28caf1a6c51efc14b0aa2b0776
Subpixel rendering: Enable compositing RenderLayer painting on device pixel position.
https://bugs.webkit.org/show_bug.cgi?id=128509

Reviewed by Simon Fraser.

GraphicsLayer is now positioned on device pixel boundary. This enables us to put
compositing layers on a subpixel position and animate them with device pixel
precision.

Source/WebCore:

Tests: fast/sub-pixel/compositing-layers-on-subpixel-position.html
       fast/sub-pixel/simple-clipping.html

* platform/LayoutUnit.h:
(WebCore::ceilToDevicePixel):
* platform/graphics/LayoutPoint.h:
(WebCore::flooredForPainting):
(WebCore::ceiledForPainting):
* platform/graphics/LayoutRect.cpp:
(WebCore::enclosingRectForPainting):
* platform/graphics/LayoutRect.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
* rendering/RenderLayerBacking.cpp:
(WebCore::clipBox):
(WebCore::pixelFractionForLayerPainting):
(WebCore::calculateDevicePixelOffsetFromRenderer):
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
(WebCore::RenderLayerBacking::paintIntoLayer):
* rendering/RenderLayerBacking.h:

LayoutTests:

* TestExpectations:
* fast/sub-pixel/compositing-layers-on-subpixel-position-expected.html: Added.
* fast/sub-pixel/compositing-layers-on-subpixel-position.html: Added.
* fast/sub-pixel/simple-clipping-expected.html: Added.
* fast/sub-pixel/simple-clipping.html: Added.
* platform/mac/compositing/layer-creation/overlap-animation-container-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/fast/sub-pixel/compositing-layers-on-subpixel-position-expected.html [new file with mode: 0644]
LayoutTests/fast/sub-pixel/compositing-layers-on-subpixel-position.html [new file with mode: 0644]
LayoutTests/fast/sub-pixel/simple-clipping-expected.html [new file with mode: 0644]
LayoutTests/fast/sub-pixel/simple-clipping.html [new file with mode: 0644]
LayoutTests/platform/mac/compositing/layer-creation/overlap-animation-container-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/LayoutUnit.h
Source/WebCore/platform/graphics/LayoutPoint.h
Source/WebCore/platform/graphics/LayoutRect.cpp
Source/WebCore/platform/graphics/LayoutRect.h
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerBacking.h