Title: [137216] trunk
- Revision
- 137216
- Author
- [email protected]
- Date
- 2012-12-10 15:43:50 -0800 (Mon, 10 Dec 2012)
Log Message
When converting a layer into a tiled layer, ensure that we update the visible rect
https://bugs.webkit.org/show_bug.cgi?id=104467
Reviewed by Darin Adler.
Source/WebCore:
When a GraphicsLayerCA toggles to use a TileCache, we have to ensure that the
layer's visible rect (which is used to ensure tile coverage) is updated in
the same commit. Otherwise we can get blank layers until something else causes
the visible rect to be updated.
Test: compositing/tiling/tiled-layer-resize.html
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::dumpAdditionalProperties): With the debug flag, dump the TiledBacking
address for ease of debugging.
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Set the VisibleRectChanged bit in
m_uncommittedChanges if we've just switched to a tiled layer.
LayoutTests:
Test that resizes a layer over the tiled layer threshold, then dumps layer data.
Mac-specific results added because only Mac dumps tile cache info.
* compositing/tiling/tiled-layer-resize-expected.txt: Added.
* compositing/tiling/tiled-layer-resize.html: Added.
* platform/mac/compositing/tiling/tiled-layer-resize-expected.txt: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (137215 => 137216)
--- trunk/LayoutTests/ChangeLog 2012-12-10 23:43:43 UTC (rev 137215)
+++ trunk/LayoutTests/ChangeLog 2012-12-10 23:43:50 UTC (rev 137216)
@@ -1,5 +1,20 @@
2012-12-10 Simon Fraser <[email protected]>
+ When converting a layer into a tiled layer, ensure that we update the visible rect
+ https://bugs.webkit.org/show_bug.cgi?id=104467
+
+ Reviewed by Darin Adler.
+
+ Test that resizes a layer over the tiled layer threshold, then dumps layer data.
+
+ Mac-specific results added because only Mac dumps tile cache info.
+
+ * compositing/tiling/tiled-layer-resize-expected.txt: Added.
+ * compositing/tiling/tiled-layer-resize.html: Added.
+ * platform/mac/compositing/tiling/tiled-layer-resize-expected.txt: Added.
+
+2012-12-10 Simon Fraser <[email protected]>
+
Don't unconditionally repaint compositing layers when their size changes
https://bugs.webkit.org/show_bug.cgi?id=104461
Added: trunk/LayoutTests/compositing/tiling/tiled-layer-resize-expected.txt (0 => 137216)
--- trunk/LayoutTests/compositing/tiling/tiled-layer-resize-expected.txt (rev 0)
+++ trunk/LayoutTests/compositing/tiling/tiled-layer-resize-expected.txt 2012-12-10 23:43:50 UTC (rev 137216)
@@ -0,0 +1,17 @@
+Tiled layer
+(GraphicsLayer
+ (bounds 808.00 2121.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 808.00 2121.00)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 800.00 2100.00)
+ (drawsContent 1)
+ )
+ )
+ )
+ )
+)
+
Property changes on: trunk/LayoutTests/compositing/tiling/tiled-layer-resize-expected.txt
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Added: trunk/LayoutTests/compositing/tiling/tiled-layer-resize.html (0 => 137216)
--- trunk/LayoutTests/compositing/tiling/tiled-layer-resize.html (rev 0)
+++ trunk/LayoutTests/compositing/tiling/tiled-layer-resize.html 2012-12-10 23:43:50 UTC (rev 137216)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ #tiled {
+ width: 800px;
+ height: 1800px;
+ background-color: silver;
+ -webkit-transform: translateZ(00);
+ }
+ </style>
+ <script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ function doTest()
+ {
+ // Force compositing update before changing layer size.
+ if (window.internals)
+ window.internals.layerTreeAsText(document);
+
+ document.getElementById('tiled').style.height = '2100px';
+
+ if (window.internals)
+ document.getElementById('layers').textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_TILE_CACHES);
+ }
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+
+ <div id="tiled">Tiled layer</div>
+<pre id="layers"></pre>
+</body>
+</html>
Property changes on: trunk/LayoutTests/compositing/tiling/tiled-layer-resize.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Added: trunk/LayoutTests/platform/mac/compositing/tiling/tiled-layer-resize-expected.txt (0 => 137216)
--- trunk/LayoutTests/platform/mac/compositing/tiling/tiled-layer-resize-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/compositing/tiling/tiled-layer-resize-expected.txt 2012-12-10 23:43:50 UTC (rev 137216)
@@ -0,0 +1,21 @@
+Tiled layer
+(GraphicsLayer
+ (bounds 808.00 2121.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 808.00 2121.00)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 800.00 2100.00)
+ (usingTiledLayer 1)
+ (drawsContent 1)
+ (tile cache coverage 0, 0 800 x 1024)
+ (tile size 512 x 512)
+ (top left tile 0, 0 tiles grid 2 x 2)
+ )
+ )
+ )
+ )
+)
+
Property changes on: trunk/LayoutTests/platform/mac/compositing/tiling/tiled-layer-resize-expected.txt
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (137215 => 137216)
--- trunk/Source/WebCore/ChangeLog 2012-12-10 23:43:43 UTC (rev 137215)
+++ trunk/Source/WebCore/ChangeLog 2012-12-10 23:43:50 UTC (rev 137216)
@@ -1,5 +1,25 @@
2012-12-10 Simon Fraser <[email protected]>
+ When converting a layer into a tiled layer, ensure that we update the visible rect
+ https://bugs.webkit.org/show_bug.cgi?id=104467
+
+ Reviewed by Darin Adler.
+
+ When a GraphicsLayerCA toggles to use a TileCache, we have to ensure that the
+ layer's visible rect (which is used to ensure tile coverage) is updated in
+ the same commit. Otherwise we can get blank layers until something else causes
+ the visible rect to be updated.
+
+ Test: compositing/tiling/tiled-layer-resize.html
+
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::dumpAdditionalProperties): With the debug flag, dump the TiledBacking
+ address for ease of debugging.
+ (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Set the VisibleRectChanged bit in
+ m_uncommittedChanges if we've just switched to a tiled layer.
+
+2012-12-10 Simon Fraser <[email protected]>
+
Don't unconditionally repaint compositing layers when their size changes
https://bugs.webkit.org/show_bug.cgi?id=104461
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (137215 => 137216)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2012-12-10 23:43:43 UTC (rev 137215)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2012-12-10 23:43:50 UTC (rev 137216)
@@ -2549,6 +2549,11 @@
}
if (tiledBacking() && (behavior & LayerTreeAsTextIncludeTileCaches)) {
+ if (behavior & LayerTreeAsTextDebug) {
+ writeIndent(textStream, indent + 1);
+ textStream << "(tiled backing " << tiledBacking() << ")\n";
+ }
+
IntRect tileCoverageRect = tiledBacking()->tileCoverageRect();
writeIndent(textStream, indent + 1);
textStream << "(tile cache coverage " << tileCoverageRect.x() << ", " << tileCoverageRect.y() << " " << tileCoverageRect.width() << " x " << tileCoverageRect.height() << ")\n";
@@ -2643,6 +2648,9 @@
| OpacityChanged
| DebugIndicatorsChanged;
+ if (m_usingTiledLayer)
+ m_uncommittedChanges |= VisibleRectChanged;
+
#ifndef NDEBUG
String name = String::format("%sCALayer(%p) GraphicsLayer(%p) ", (m_layer->layerType() == PlatformCALayer::LayerTypeWebTiledLayer) ? "Tiled " : "", m_layer->platformLayer(), this) + m_name;
m_layer->setName(name);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes