Title: [105002] branches/safari-534.54-branch

Diff

Modified: branches/safari-534.54-branch/LayoutTests/ChangeLog (105001 => 105002)


--- branches/safari-534.54-branch/LayoutTests/ChangeLog	2012-01-13 23:35:58 UTC (rev 105001)
+++ branches/safari-534.54-branch/LayoutTests/ChangeLog	2012-01-13 23:39:26 UTC (rev 105002)
@@ -1,5 +1,21 @@
 2011-1-13  Lucas Forschler  <lforsch...@apple.com>
 
+    Merge 104352
+
+    2012-01-05  Simon Fraser  <simon.fra...@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.
+
+2011-1-13  Lucas Forschler  <lforsch...@apple.com>
+
     Merge 104239
 
     2012-01-05  Anders Carlsson  <ander...@apple.com>

Copied: branches/safari-534.54-branch/LayoutTests/compositing/tiled-layers-hidpi-expected.txt (from rev 104352, trunk/LayoutTests/compositing/tiled-layers-hidpi-expected.txt) (0 => 105002)


--- branches/safari-534.54-branch/LayoutTests/compositing/tiled-layers-hidpi-expected.txt	                        (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/compositing/tiled-layers-hidpi-expected.txt	2012-01-13 23:39:26 UTC (rev 105002)
@@ -0,0 +1,16 @@
+(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)
+        )
+      )
+    )
+  )
+)
+

Copied: branches/safari-534.54-branch/LayoutTests/compositing/tiled-layers-hidpi.html (from rev 104352, trunk/LayoutTests/compositing/tiled-layers-hidpi.html) (0 => 105002)


--- branches/safari-534.54-branch/LayoutTests/compositing/tiled-layers-hidpi.html	                        (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/compositing/tiled-layers-hidpi.html	2012-01-13 23:39:26 UTC (rev 105002)
@@ -0,0 +1,31 @@
+<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>

Modified: branches/safari-534.54-branch/Source/WebCore/ChangeLog (105001 => 105002)


--- branches/safari-534.54-branch/Source/WebCore/ChangeLog	2012-01-13 23:35:58 UTC (rev 105001)
+++ branches/safari-534.54-branch/Source/WebCore/ChangeLog	2012-01-13 23:39:26 UTC (rev 105002)
@@ -1,5 +1,24 @@
 2011-1-13  Lucas Forschler  <lforsch...@apple.com>
 
+    Merge 104352
+
+    2012-01-05  Simon Fraser  <simon.fra...@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):
+
+2011-1-13  Lucas Forschler  <lforsch...@apple.com>
+
     Merge 104269
 
     2012-01-05  Dan Bernstein  <m...@apple.com>

Modified: branches/safari-534.54-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (105001 => 105002)


--- branches/safari-534.54-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp	2012-01-13 23:35:58 UTC (rev 105001)
+++ branches/safari-534.54-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp	2012-01-13 23:39:26 UTC (rev 105002)
@@ -2038,10 +2038,8 @@
     if (!m_drawsContent || !m_allowTiledLayer)
         return false;
 
-    float contentsScale = pageScaleFactor * deviceScaleFactor();
-
     // FIXME: catch zero-size height or width here (or earlier)?
-    return size.width() * contentsScale > cMaxPixelDimension || size.height() * contentsScale > cMaxPixelDimension;
+    return size.width() * pageScaleFactor > cMaxPixelDimension || m_size.height() * pageScaleFactor > cMaxPixelDimension;
 }
 
 void GraphicsLayerCA::swapFromOrToTiledLayer(bool useTiledLayer, float pageScaleFactor, const FloatPoint& positionRelativeToBase)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to