Title: [140984] trunk/Source/WebCore
Revision
140984
Author
[email protected]
Date
2013-01-28 11:24:57 -0800 (Mon, 28 Jan 2013)

Log Message

Repaint issues in background tabs after r138858
https://bugs.webkit.org/show_bug.cgi?id=108092
<rdar://problem/13076430>

Reviewed by Tim Horton.

In r138858, we unparented all tiles in the tile caches of background tabs.
That broke repaints in background tabs; when bringing that tab back to the
foreground, we would call -setNeedsDisplayInRect:, and then reparent the tiles
on a zero-delay timer. Those repaints would then be flipped (possibly because
CA can't look up the layer tree to check for flipped geometry).

Fix by revalidating tiles (which reparents the tiles) at the time we're told
we're moving into the window, which happens before repaints are flushed.

* platform/graphics/ca/mac/TileCache.mm:
(WebCore::TileCache::setIsInWindow):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (140983 => 140984)


--- trunk/Source/WebCore/ChangeLog	2013-01-28 19:23:05 UTC (rev 140983)
+++ trunk/Source/WebCore/ChangeLog	2013-01-28 19:24:57 UTC (rev 140984)
@@ -1,3 +1,23 @@
+2013-01-28  Simon Fraser  <[email protected]>
+
+        Repaint issues in background tabs after r138858
+        https://bugs.webkit.org/show_bug.cgi?id=108092
+        <rdar://problem/13076430>
+
+        Reviewed by Tim Horton.
+
+        In r138858, we unparented all tiles in the tile caches of background tabs.
+        That broke repaints in background tabs; when bringing that tab back to the
+        foreground, we would call -setNeedsDisplayInRect:, and then reparent the tiles
+        on a zero-delay timer. Those repaints would then be flipped (possibly because
+        CA can't look up the layer tree to check for flipped geometry).
+        
+        Fix by revalidating tiles (which reparents the tiles) at the time we're told
+        we're moving into the window, which happens before repaints are flushed.
+
+        * platform/graphics/ca/mac/TileCache.mm:
+        (WebCore::TileCache::setIsInWindow):
+
 2013-01-28  Adam Barth  <[email protected]>
 
         Remove webkitNotifications.createHTMLNotification

Modified: trunk/Source/WebCore/platform/graphics/ca/mac/TileCache.mm (140983 => 140984)


--- trunk/Source/WebCore/platform/graphics/ca/mac/TileCache.mm	2013-01-28 19:23:05 UTC (rev 140983)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/TileCache.mm	2013-01-28 19:24:57 UTC (rev 140984)
@@ -339,8 +339,12 @@
 
     m_isInWindow = isInWindow;
 
-    const double tileRevalidationTimeout = 4;
-    scheduleTileRevalidation(m_isInWindow ? 0 : tileRevalidationTimeout);
+    if (m_isInWindow)
+        revalidateTiles();
+    else {
+        const double tileRevalidationTimeout = 4;
+        scheduleTileRevalidation(tileRevalidationTimeout);
+    }
 }
 
 void TileCache::setTileCoverage(TileCoverage coverage)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to