[WK2] LayerTreeCoordinator can disallow tile updates in forceRepaint
authorkbalazs@webkit.org <kbalazs@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Aug 2012 13:06:16 +0000 (13:06 +0000)
committerkbalazs@webkit.org <kbalazs@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Aug 2012 13:06:16 +0000 (13:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=93077

Reviewed by Jocelyn Turcotte.

Force tile updates when doing a forced repaint.

* WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
(WebKit::LayerTreeCoordinator::forceRepaint):
(WebKit::LayerTreeCoordinator::layerTreeTileUpdatesAllowed):
* WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h:
(LayerTreeCoordinator):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@124603 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp
Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h

index 736ae1e..eb99713 100644 (file)
@@ -1,3 +1,19 @@
+2012-08-03  Balazs Kelemen  <kbalazs@webkit.org>
+
+        [WK2] LayerTreeCoordinator can disallow tile updates in forceRepaint
+        https://bugs.webkit.org/show_bug.cgi?id=93077
+
+        Reviewed by Jocelyn Turcotte.
+
+        Force tile updates when doing a forced repaint.
+
+        * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp:
+        (WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
+        (WebKit::LayerTreeCoordinator::forceRepaint):
+        (WebKit::LayerTreeCoordinator::layerTreeTileUpdatesAllowed):
+        * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h:
+        (LayerTreeCoordinator):
+
 2012-08-02  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Inspector should set a default attached height before being attached
index 82be510..4f30a91 100644 (file)
@@ -44,6 +44,7 @@
 #include <WebCore/RenderLayerCompositor.h>
 #include <WebCore/RenderView.h>
 #include <WebCore/Settings.h>
+#include <wtf/TemporaryChange.h>
 
 using namespace WebCore;
 
@@ -77,6 +78,7 @@ LayerTreeCoordinator::LayerTreeCoordinator(WebPage* webPage)
     , m_shouldSyncRootLayer(true)
     , m_layerFlushTimer(this, &LayerTreeCoordinator::layerFlushTimerFired)
     , m_layerFlushSchedulingEnabled(true)
+    , m_inForceRepaint(false)
 {
     // Create a root layer.
     m_rootLayer = GraphicsLayer::create(this);
@@ -174,6 +176,8 @@ void LayerTreeCoordinator::scrollNonCompositedContents(const WebCore::IntRect& s
 
 void LayerTreeCoordinator::forceRepaint()
 {
+    WTF::TemporaryChange<bool> inForceRepaint(m_inForceRepaint, true);
+
     // This is necessary for running layout tests. Since in this case we are not waiting for a UIProcess to reply nicely.
     // Instead we are just triggering forceRepaint. But we still want to have the scripted animation callbacks being executed.
     syncDisplayState();
@@ -575,7 +579,7 @@ void LayerTreeCoordinator::renderNextFrame()
 
 bool LayerTreeCoordinator::layerTreeTileUpdatesAllowed() const
 {
-    return !m_isSuspended && !m_waitingForUIProcess;
+    return m_inForceRepaint || (!m_isSuspended && !m_waitingForUIProcess);
 }
 
 void LayerTreeCoordinator::purgeBackingStores()
index c406e45..e653cb8 100644 (file)
@@ -137,6 +137,7 @@ private:
     void layerFlushTimerFired(WebCore::Timer<LayerTreeCoordinator>*);
     WebCore::Timer<LayerTreeCoordinator> m_layerFlushTimer;
     bool m_layerFlushSchedulingEnabled;
+    bool m_inForceRepaint;
 };
 
 }