Title: [160052] trunk/Source/WebKit2
Revision
160052
Author
[email protected]
Date
2013-12-03 15:28:10 -0800 (Tue, 03 Dec 2013)

Log Message

Remote Layer Tree: Force repaint
https://bugs.webkit.org/show_bug.cgi?id=125189
<rdar://problem/15541789>

Reviewed by Anders Carlsson.

* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::forceRepaint):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::forceRepaint):
Implement WebProcess-synchronous force repaint.
We don't need the async variant because it is only needed
to synchronize with the WebProcess-side threaded scrolling
tree, which is not a component of the remote layer tree model.
The UI process will not handle the callback until after
RemoteLayerTreeHost::commit is complete, ensuring that the commit
is actually done.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (160051 => 160052)


--- trunk/Source/WebKit2/ChangeLog	2013-12-03 23:26:46 UTC (rev 160051)
+++ trunk/Source/WebKit2/ChangeLog	2013-12-03 23:28:10 UTC (rev 160052)
@@ -1,3 +1,25 @@
+2013-12-03  Tim Horton  <[email protected]>
+
+        Remote Layer Tree: Force repaint
+        https://bugs.webkit.org/show_bug.cgi?id=125189
+        <rdar://problem/15541789>
+
+        Reviewed by Anders Carlsson.
+
+        * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
+        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
+        (WebKit::RemoteLayerTreeContext::forceRepaint):
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+        (WebKit::RemoteLayerTreeDrawingArea::forceRepaint):
+        Implement WebProcess-synchronous force repaint.
+        We don't need the async variant because it is only needed
+        to synchronize with the WebProcess-side threaded scrolling
+        tree, which is not a component of the remote layer tree model.
+        The UI process will not handle the callback until after
+        RemoteLayerTreeHost::commit is complete, ensuring that the commit
+        is actually done.
+
 2013-12-03  Simon Fraser  <[email protected]>
 
         Remove some iOS-related documentScale code

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h (160051 => 160052)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h	2013-12-03 23:26:46 UTC (rev 160051)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h	2013-12-03 23:28:10 UTC (rev 160052)
@@ -58,6 +58,8 @@
 
     void setIsFlushingSuspended(bool);
 
+    void forceRepaint();
+
 private:
     // WebCore::GraphicsLayerFactory
     virtual std::unique_ptr<WebCore::GraphicsLayer> createGraphicsLayer(WebCore::GraphicsLayerClient*) OVERRIDE;

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm (160051 => 160052)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm	2013-12-03 23:26:46 UTC (rev 160051)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm	2013-12-03 23:28:10 UTC (rev 160052)
@@ -26,6 +26,7 @@
 #import "config.h"
 #import "RemoteLayerTreeContext.h"
 
+#import "GenericCallback.h"
 #import "GraphicsLayerCARemote.h"
 #import "PlatformCALayerRemote.h"
 #import "RemoteLayerTreeTransaction.h"
@@ -151,4 +152,20 @@
     }
 }
 
+void RemoteLayerTreeContext::forceRepaint()
+{
+    if (m_isFlushingSuspended)
+        return;
+
+    for (Frame* frame = &m_webPage->corePage()->mainFrame(); frame; frame = frame->tree().traverseNext()) {
+        FrameView* frameView = frame->view();
+        if (!frameView || !frameView->tiledBacking())
+            continue;
+
+        frameView->tiledBacking()->forceRepaint();
+    }
+
+    flushLayers();
+}
+
 } // namespace WebKit

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h (160051 => 160052)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h	2013-12-03 23:26:46 UTC (rev 160051)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h	2013-12-03 23:28:10 UTC (rev 160052)
@@ -66,6 +66,9 @@
 
     virtual void setLayerTreeStateIsFrozen(bool) OVERRIDE;
 
+    virtual void forceRepaint() OVERRIDE;
+    virtual bool forceRepaintAsync(uint64_t) OVERRIDE { return false; }
+
     // WebCore::GraphicsLayerClient
     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) OVERRIDE { }
     virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) OVERRIDE { }

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (160051 => 160052)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm	2013-12-03 23:26:46 UTC (rev 160051)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm	2013-12-03 23:28:10 UTC (rev 160052)
@@ -202,4 +202,9 @@
     m_remoteLayerTreeContext->setIsFlushingSuspended(isFrozen);
 }
 
+void RemoteLayerTreeDrawingArea::forceRepaint()
+{
+    m_remoteLayerTreeContext->forceRepaint();
+}
+
 } // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to