Avoid falling into tiled layers more often when the device scale factor is > 1

<rdar://problem/10588725>

Source/WebCore:

Reviewed by John Sullivan.

Stop taking the device scale factor into account when deciding to make
tiled layers.

Test: compositing/tiled-layers-hidpi.html

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::requiresTiledLayer):

LayoutTests:

Reviewed by John Sullivan.

Tests that a large layer with a device scale factor of 2 is not tiled.

* compositing/tiled-layers-hidpi-expected.txt: Added.
* compositing/tiled-layers-hidpi.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e87b8372
2012-01-05 Simon Fraser <simon.fraser@apple.com>
Avoid falling into tiled layers more often when the device scale factor is > 1
<rdar://problem/10588725>
Reviewed by John Sullivan.
Tests that a large layer with a device scale factor of 2 is not tiled.
* compositing/tiled-layers-hidpi-expected.txt: Added.
* compositing/tiled-layers-hidpi.html: Added.
2012-01-06 Adam Barth <abarth@webkit.org>
Rebaseline editing/input/caret-at-the-edge-of-input.html.
(GraphicsLayer
(bounds 1808.00 585.00)
(children 1
(GraphicsLayer
(bounds 1808.00 585.00)
(children 1
(GraphicsLayer
(position 8.00 8.00)
(bounds 1800.00 10.00)
(drawsContent 1)
)
)
)
)
)
<html>
<style>
#composited {
width: 1800px;
height: 10px;
-webkit-transform: translateZ(0);
background-color: blue;
}
</style>
<script>
function startTest() {
if (window.layoutTestController) {
layoutTestController.waitUntilDone();
layoutTestController.dumpAsText();
layoutTestController.setBackingScaleFactor(2, finishTest);
}
}
function finishTest() {
setTimeout(function() {
document.getElementById('layer-tree').innerText = window.layoutTestController.layerTreeAsText();
layoutTestController.notifyDone();
}, 0);
}
</script>
</head>
<body onload="startTest();">
<div id="composited"></div>
<pre id="layer-tree">Layer tree goes here in DRT</pre>
</body>
</html>
2012-01-05 Simon Fraser <simon.fraser@apple.com>
Avoid falling into tiled layers more often when the device scale factor is > 1
<rdar://problem/10588725>
Reviewed by John Sullivan.
Stop taking the device scale factor into account when deciding to make
tiled layers.
Test: compositing/tiled-layers-hidpi.html
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::requiresTiledLayer):
2012-01-06 Ryosuke Niwa <rniwa@webkit.org>
Touch a bunch of files in an attempt to fix Mac release builds.
......@@ -2181,10 +2181,8 @@ bool GraphicsLayerCA::requiresTiledLayer(float pageScaleFactor) const
if (!m_drawsContent || !m_allowTiledLayer || m_layer->layerType() == PlatformCALayer::LayerTypeTileCacheLayer)
return false;
float contentsScale = pageScaleFactor * deviceScaleFactor();
// FIXME: catch zero-size height or width here (or earlier)?
return m_size.width() * contentsScale > cMaxPixelDimension || m_size.height() * contentsScale > cMaxPixelDimension;
return m_size.width() * pageScaleFactor > cMaxPixelDimension || m_size.height() * pageScaleFactor > cMaxPixelDimension;
}
void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer, float pageScaleFactor, const FloatPoint& positionRelativeToBase)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment