Title: [109897] trunk/Source/WebCore
Revision
109897
Author
a...@0x90.dk
Date
2012-03-06 04:04:28 -0800 (Tue, 06 Mar 2012)

Log Message

Make it explicit when we are allowing updates to the actual backing store or the tile buffers https://bugs.webkit.org/show_bug.cgi?id=80288

Patch by Kenneth Rohde Christiansen and Alexander Færøy.

Reviewed by Noam Rosenthal.

* platform/graphics/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::createTiles):
(WebCore::TiledBackingStore::isBackingStoreUpdatesSuspended):
(WebCore):
(WebCore::TiledBackingStore::isTileBufferUpdatesSuspended):
(WebCore::TiledBackingStore::startTileBufferUpdateTimer):
(WebCore::TiledBackingStore::startTileCreationTimer):
* platform/graphics/TiledBackingStore.h:
(TiledBackingStore):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (109896 => 109897)


--- trunk/Source/WebCore/ChangeLog	2012-03-06 12:03:46 UTC (rev 109896)
+++ trunk/Source/WebCore/ChangeLog	2012-03-06 12:04:28 UTC (rev 109897)
@@ -1,3 +1,22 @@
+2012-03-05  Alexander Færøy  <alexander.fae...@nokia.com>
+
+        Make it explicit when we are allowing updates to the actual backing store or the tile buffers
+        https://bugs.webkit.org/show_bug.cgi?id=80288
+
+        Patch by Kenneth Rohde Christiansen and Alexander Færøy.
+
+        Reviewed by Noam Rosenthal.
+
+        * platform/graphics/TiledBackingStore.cpp:
+        (WebCore::TiledBackingStore::createTiles):
+        (WebCore::TiledBackingStore::isBackingStoreUpdatesSuspended):
+        (WebCore):
+        (WebCore::TiledBackingStore::isTileBufferUpdatesSuspended):
+        (WebCore::TiledBackingStore::startTileBufferUpdateTimer):
+        (WebCore::TiledBackingStore::startTileCreationTimer):
+        * platform/graphics/TiledBackingStore.h:
+        (TiledBackingStore):
+
 2012-03-06  Mark Rowe  <mr...@apple.com>
 
         Build fix after r109877.

Modified: trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp (109896 => 109897)


--- trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp	2012-03-06 12:03:46 UTC (rev 109896)
+++ trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp	2012-03-06 12:04:28 UTC (rev 109897)
@@ -228,7 +228,9 @@
 
 void TiledBackingStore::createTiles()
 {
-    ASSERT(!m_contentsFrozen);
+    // Guard here as as these can change before the timer fires.
+    if (isBackingStoreUpdatesSuspended())
+        return;
 
     // Update our backing store geometry.
     const IntRect previousRect = m_rect;
@@ -371,6 +373,16 @@
     adjustForContentsRect(keepRect);
 }
 
+bool TiledBackingStore::isBackingStoreUpdatesSuspended() const
+{
+    return m_contentsFrozen;
+}
+
+bool TiledBackingStore::isTileBufferUpdatesSuspended() const
+{
+    return m_contentsFrozen || !m_client->tiledBackingStoreUpdatesAllowed();
+}
+
 bool TiledBackingStore::resizeEdgeTiles()
 {
     bool wasResized = false;
@@ -470,7 +482,7 @@
 
 void TiledBackingStore::startTileBufferUpdateTimer()
 {
-    if (m_tileBufferUpdateTimer.isActive() || !m_client->tiledBackingStoreUpdatesAllowed() || m_contentsFrozen)
+    if (m_tileBufferUpdateTimer.isActive() || isTileBufferUpdatesSuspended())
         return;
     m_tileBufferUpdateTimer.startOneShot(0);
 }
@@ -482,7 +494,7 @@
 
 void TiledBackingStore::startTileCreationTimer()
 {
-    if (m_tileCreationTimer.isActive() || m_contentsFrozen)
+    if (m_tileCreationTimer.isActive() || isBackingStoreUpdatesSuspended())
         return;
     m_tileCreationTimer.startOneShot(0);
 }

Modified: trunk/Source/WebCore/platform/graphics/TiledBackingStore.h (109896 => 109897)


--- trunk/Source/WebCore/platform/graphics/TiledBackingStore.h	2012-03-06 12:03:46 UTC (rev 109896)
+++ trunk/Source/WebCore/platform/graphics/TiledBackingStore.h	2012-03-06 12:04:28 UTC (rev 109897)
@@ -90,6 +90,9 @@
     void createTiles();
     void computeCoverAndKeepRect(const IntRect& visibleRect, IntRect& coverRect, IntRect& keepRect) const;
 
+    bool isBackingStoreUpdatesSuspended() const;
+    bool isTileBufferUpdatesSuspended() const;
+
     void commitScaleChange();
 
     bool resizeEdgeTiles();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to