Title: [210095] trunk/Source/WebCore
Revision
210095
Author
[email protected]
Date
2016-12-21 19:06:35 -0800 (Wed, 21 Dec 2016)

Log Message

TileGrid revalidates tiles twice during flush, first with wrong visible rect
https://bugs.webkit.org/show_bug.cgi?id=166406

Reviewed by Simon Fraser.

No new tests; existing tests cover this code, this is just a perf win,
specifically reducing the amount of layer churn during zooming.

* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::setScale):
Schedule a revalidation, which will happen later in the same flush,
instead of doing it immediately. Doing it immediately is problematic,
because we're currently in the middle of a GraphicsLayer tree flush,
and don't have the complete picture of the new state yet. We're guaranteed
to get the new scale *before* the flush calls revalidateTiles.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (210094 => 210095)


--- trunk/Source/WebCore/ChangeLog	2016-12-22 03:06:05 UTC (rev 210094)
+++ trunk/Source/WebCore/ChangeLog	2016-12-22 03:06:35 UTC (rev 210095)
@@ -1,5 +1,23 @@
 2016-12-21  Tim Horton  <[email protected]>
 
+        TileGrid revalidates tiles twice during flush, first with wrong visible rect
+        https://bugs.webkit.org/show_bug.cgi?id=166406
+
+        Reviewed by Simon Fraser.
+
+        No new tests; existing tests cover this code, this is just a perf win,
+        specifically reducing the amount of layer churn during zooming.
+
+        * platform/graphics/ca/TileGrid.cpp:
+        (WebCore::TileGrid::setScale):
+        Schedule a revalidation, which will happen later in the same flush,
+        instead of doing it immediately. Doing it immediately is problematic,
+        because we're currently in the middle of a GraphicsLayer tree flush,
+        and don't have the complete picture of the new state yet. We're guaranteed
+        to get the new scale *before* the flush calls revalidateTiles.
+
+2016-12-21  Tim Horton  <[email protected]>
+
         TileGrid creates new tiles when there are recyclable tiles about to be removed
         https://bugs.webkit.org/show_bug.cgi?id=166408
 

Modified: trunk/Source/WebCore/platform/graphics/ca/TileGrid.cpp (210094 => 210095)


--- trunk/Source/WebCore/platform/graphics/ca/TileGrid.cpp	2016-12-22 03:06:05 UTC (rev 210094)
+++ trunk/Source/WebCore/platform/graphics/ca/TileGrid.cpp	2016-12-22 03:06:35 UTC (rev 210095)
@@ -78,8 +78,7 @@
     transform.scale(1 / m_scale);
     m_containerLayer->setTransform(transform);
 
-    // FIXME: we may revalidateTiles twice in this commit.
-    revalidateTiles(PruneSecondaryTiles);
+    m_controller.setNeedsRevalidateTiles();
 
     m_containerLayer.get().setContentsScale(m_controller.deviceScaleFactor());
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to