<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[161327] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/161327">161327</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2014-01-05 20:08:30 -0800 (Sun, 05 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Move responsibility for remote layer tree committing to RemoteLayerTreeDrawingArea
https://bugs.webkit.org/show_bug.cgi?id=126501

Source/WebCore:

Reviewed by Sam Weinig.

Add type-safe casting to GraphicsLayer.

* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::isGraphicsLayerCA):
(WebCore::GraphicsLayer::isGraphicsLayerCARemote):
* platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::GraphicsLayerCA::isGraphicsLayerCA):

Source/WebKit2:

Reviewed by Sam Weinig.

Soon we shall need to do atomic commits of both the remote layer tree, and
the remote scrolling tree. Pave the way by moving responsibility for remote
layer tree committing to RemoteLayerTreeDrawingArea.

So move the flushing logic from RemoteLayerTreeHost to RemoteLayerTreeDrawingArea.
After this change, RemoteLayerTreeHost doesn't do much and could possibly be
removed in future.

Also add type-safe casting to GraphicsLayer and DrawingArea.

* DerivedSources.make: Out with RemoteLayerTreeHost, in with RemoteLayerTreeDrawingAreaProxy
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
(WebKit::RemoteLayerTreeDrawingAreaProxy::remoteLayerTreeHost):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in: Renamed from Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.messages.in.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): Add message receiver.
(WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy): Remove message receiver.
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): Hand the transaction off to the layer
tree host.
* UIProcess/mac/RemoteLayerTreeHost.h:
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::RemoteLayerTreeHost): No longer a message receiver.
(WebKit::RemoteLayerTreeHost::~RemoteLayerTreeHost):
(WebKit::RemoteLayerTreeHost::updateLayerTree):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::type):
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::RemoteLayerTreeContext):
(WebKit::RemoteLayerTreeContext::flushOutOfTreeLayers):
(WebKit::RemoteLayerTreeContext::buildTransaction):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
(WebKit::RemoteLayerTreeDrawingArea::setLayerTreeStateIsFrozen):
(WebKit::RemoteLayerTreeDrawingArea::forceRepaint):
(WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
(WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired):
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsLayerh">trunk/Source/WebCore/platform/graphics/GraphicsLayer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAh">trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2DerivedSourcesmake">trunk/Source/WebKit2/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxyh">trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymm">trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacRemoteLayerTreeHosth">trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacRemoteLayerTreeHostmm">trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacGraphicsLayerCARemoteh">trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteh">trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeContexth">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeContextmm">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymessagesin">trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessmacRemoteLayerTreeHostmessagesin">trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.messages.in</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebCore/ChangeLog        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2014-01-05  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Move responsibility for remote layer tree committing to RemoteLayerTreeDrawingArea
+        https://bugs.webkit.org/show_bug.cgi?id=126501
+
+        Reviewed by Sam Weinig.
+
+        Add type-safe casting to GraphicsLayer.
+
+        * platform/graphics/GraphicsLayer.h:
+        (WebCore::GraphicsLayer::isGraphicsLayerCA):
+        (WebCore::GraphicsLayer::isGraphicsLayerCARemote):
+        * platform/graphics/ca/GraphicsLayerCA.h:
+        (WebCore::GraphicsLayerCA::isGraphicsLayerCA):
+
</ins><span class="cx"> 2014-01-05  Martin Robinson  &lt;mrobinson@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] [CMake] Ensure that the autotools build and the CMake install the same files
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.h (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -493,6 +493,9 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool canThrottleLayerFlush() const { return false; }
</span><span class="cx"> 
</span><ins>+    virtual bool isGraphicsLayerCA() const { return false; }
+    virtual bool isGraphicsLayerCARemote() const { return false; }
+
</ins><span class="cx"> protected:
</span><span class="cx">     // Should be called from derived class destructors. Should call willBeDestroyed() on super.
</span><span class="cx">     virtual void willBeDestroyed();
</span><span class="lines">@@ -587,6 +590,8 @@
</span><span class="cx">     CustomAppearance m_customAppearance;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+#define GRAPHICSLAYER_TYPE_CASTS(ToValueTypeName, predicate) \
+    TYPE_CASTS_BASE(ToValueTypeName, WebCore::GraphicsLayer, value, value-&gt;predicate, value.predicate)
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -163,6 +163,8 @@
</span><span class="cx">     virtual void setOpacityInternal(float);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><ins>+    virtual bool isGraphicsLayerCA() const { return true; }
+
</ins><span class="cx">     virtual void willBeDestroyed();
</span><span class="cx"> 
</span><span class="cx">     // PlatformCALayerClient overrides
</span><span class="lines">@@ -526,6 +528,8 @@
</span><span class="cx">     bool m_isCommittingChanges;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+GRAPHICSLAYER_TYPE_CASTS(GraphicsLayerCA, isGraphicsLayerCA());
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebKit2/ChangeLog        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -1,3 +1,54 @@
</span><ins>+2014-01-05  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Move responsibility for remote layer tree committing to RemoteLayerTreeDrawingArea
+        https://bugs.webkit.org/show_bug.cgi?id=126501
+
+        Reviewed by Sam Weinig.
+        
+        Soon we shall need to do atomic commits of both the remote layer tree, and
+        the remote scrolling tree. Pave the way by moving responsibility for remote
+        layer tree committing to RemoteLayerTreeDrawingArea.
+        
+        So move the flushing logic from RemoteLayerTreeHost to RemoteLayerTreeDrawingArea.
+        After this change, RemoteLayerTreeHost doesn't do much and could possibly be
+        removed in future.
+        
+        Also add type-safe casting to GraphicsLayer and DrawingArea.
+
+        * DerivedSources.make: Out with RemoteLayerTreeHost, in with RemoteLayerTreeDrawingAreaProxy
+        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
+        (WebKit::RemoteLayerTreeDrawingAreaProxy::remoteLayerTreeHost):
+        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in: Renamed from Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.messages.in.
+        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
+        (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy): Add message receiver.
+        (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy): Remove message receiver.
+        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): Hand the transaction off to the layer
+        tree host.
+        * UIProcess/mac/RemoteLayerTreeHost.h:
+        * UIProcess/mac/RemoteLayerTreeHost.mm:
+        (WebKit::RemoteLayerTreeHost::RemoteLayerTreeHost): No longer a message receiver.
+        (WebKit::RemoteLayerTreeHost::~RemoteLayerTreeHost):
+        (WebKit::RemoteLayerTreeHost::updateLayerTree):
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/WebPage/DrawingArea.h:
+        (WebKit::DrawingArea::type):
+        * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
+        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
+        * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
+        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
+        (WebKit::RemoteLayerTreeContext::RemoteLayerTreeContext):
+        (WebKit::RemoteLayerTreeContext::flushOutOfTreeLayers):
+        (WebKit::RemoteLayerTreeContext::buildTransaction):
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+        (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
+        (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
+        (WebKit::RemoteLayerTreeDrawingArea::setLayerTreeStateIsFrozen):
+        (WebKit::RemoteLayerTreeDrawingArea::forceRepaint):
+        (WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
+        (WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired):
+        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
+
</ins><span class="cx"> 2014-01-05  Martin Robinson  &lt;mrobinson@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] [CMake] Ensure that the autotools build and the CMake install the same files
</span></span></pre></div>
<a id="trunkSourceWebKit2DerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DerivedSources.make (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DerivedSources.make        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebKit2/DerivedSources.make        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx">     PluginProcessConnectionManager \
</span><span class="cx">     PluginProcessProxy \
</span><span class="cx">     PluginProxy \
</span><del>-    RemoteLayerTreeHost \
</del><ins>+    RemoteLayerTreeDrawingAreaProxy \
</ins><span class="cx">     RemoteObjectRegistry \
</span><span class="cx">     SecItemShim \
</span><span class="cx">     SecItemShimProxy \
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -33,16 +33,26 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><ins>+class RemoteLayerTreeTransaction;
+
</ins><span class="cx"> class RemoteLayerTreeDrawingAreaProxy : public DrawingAreaProxy {
</span><span class="cx"> public:
</span><span class="cx">     explicit RemoteLayerTreeDrawingAreaProxy(WebPageProxy*);
</span><span class="cx">     virtual ~RemoteLayerTreeDrawingAreaProxy();
</span><span class="cx"> 
</span><ins>+    const RemoteLayerTreeHost&amp; remoteLayerTreeHost() const { return m_remoteLayerTreeHost; }
+    
</ins><span class="cx"> private:
</span><span class="cx">     virtual void sizeDidChange() OVERRIDE;
</span><span class="cx">     virtual void deviceScaleFactorDidChange() OVERRIDE;
</span><span class="cx">     virtual void didUpdateGeometry() OVERRIDE;
</span><span class="cx"> 
</span><ins>+    // CoreIPC::MessageReceiver
+    virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&amp;) OVERRIDE;
+
+    // Message handlers
+    void commitLayerTree(const RemoteLayerTreeTransaction&amp;);
+    
</ins><span class="cx">     void sendUpdateGeometry();
</span><span class="cx"> 
</span><span class="cx">     RemoteLayerTreeHost m_remoteLayerTreeHost;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymessagesinfromrev161325trunkSourceWebKit2UIProcessmacRemoteLayerTreeHostmessagesin"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in (from rev 161325, trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.messages.in) (0 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+# Copyright (C) 2014 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+messages -&gt; RemoteLayerTreeDrawingAreaProxy {
+    void CommitLayerTree(WebKit::RemoteLayerTreeTransaction layerTreeTransaction)
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #import &quot;config.h&quot;
</span><span class="cx"> #import &quot;RemoteLayerTreeDrawingAreaProxy.h&quot;
</span><span class="cx"> 
</span><ins>+#import &quot;RemoteLayerTreeDrawingAreaProxyMessages.h&quot;
</ins><span class="cx"> #import &quot;DrawingAreaMessages.h&quot;
</span><span class="cx"> #import &quot;WebPageProxy.h&quot;
</span><span class="cx"> #import &quot;WebProcessProxy.h&quot;
</span><span class="lines">@@ -37,10 +38,12 @@
</span><span class="cx">     , m_remoteLayerTreeHost(webPageProxy)
</span><span class="cx">     , m_isWaitingForDidUpdateGeometry(false)
</span><span class="cx"> {
</span><ins>+    m_webPageProxy-&gt;process().addMessageReceiver(Messages::RemoteLayerTreeDrawingAreaProxy::messageReceiverName(), m_webPageProxy-&gt;pageID(), *this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy()
</span><span class="cx"> {
</span><ins>+    m_webPageProxy-&gt;process().removeMessageReceiver(Messages::RemoteLayerTreeDrawingAreaProxy::messageReceiverName(), m_webPageProxy-&gt;pageID());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RemoteLayerTreeDrawingAreaProxy::sizeDidChange()
</span><span class="lines">@@ -79,4 +82,9 @@
</span><span class="cx">     m_isWaitingForDidUpdateGeometry = true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void RemoteLayerTreeDrawingAreaProxy::commitLayerTree(const RemoteLayerTreeTransaction&amp; layerTreeTransaction)
+{
+    m_remoteLayerTreeHost.updateLayerTree(layerTreeTransaction);
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeHosth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -26,7 +26,6 @@
</span><span class="cx"> #ifndef RemoteLayerTreeHost_h
</span><span class="cx"> #define RemoteLayerTreeHost_h
</span><span class="cx"> 
</span><del>-#include &quot;MessageReceiver.h&quot;
</del><span class="cx"> #include &quot;RemoteLayerTreeTransaction.h&quot;
</span><span class="cx"> #include &lt;WebCore/PlatformCALayer.h&gt;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="lines">@@ -38,19 +37,16 @@
</span><span class="cx"> 
</span><span class="cx"> class WebPageProxy;
</span><span class="cx"> 
</span><del>-class RemoteLayerTreeHost : private IPC::MessageReceiver {
</del><ins>+class RemoteLayerTreeHost {
</ins><span class="cx"> public:
</span><span class="cx">     explicit RemoteLayerTreeHost(WebPageProxy*);
</span><del>-    ~RemoteLayerTreeHost();
</del><ins>+    virtual ~RemoteLayerTreeHost();
</ins><span class="cx"> 
</span><del>-private:
-    // IPC::MessageReceiver.
-    virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&amp;) OVERRIDE;
</del><ins>+    CALayer *getLayer(WebCore::GraphicsLayer::PlatformLayerID) const;
</ins><span class="cx"> 
</span><del>-    // Message handlers.
-    void commit(const RemoteLayerTreeTransaction&amp;);
</del><ins>+    void updateLayerTree(const RemoteLayerTreeTransaction&amp;);
</ins><span class="cx"> 
</span><del>-    CALayer *getLayer(WebCore::GraphicsLayer::PlatformLayerID) const;
</del><ins>+private:
</ins><span class="cx">     CALayer *createLayer(RemoteLayerTreeTransaction::LayerCreationProperties);
</span><span class="cx"> 
</span><span class="cx">     WebPageProxy* m_webPageProxy;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeHostmessagesin"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.messages.in (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.messages.in        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.messages.in        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -1,25 +0,0 @@
</span><del>-# Copyright (C) 2012 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-messages -&gt; RemoteLayerTreeHost {
-    void Commit(WebKit::RemoteLayerTreeTransaction transaction)
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeHostmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> #import &quot;RemoteLayerTreeHost.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #import &quot;Logging.h&quot;
</span><del>-#import &quot;RemoteLayerTreeHostMessages.h&quot;
</del><span class="cx"> #import &quot;RemoteLayerTreePropertyApplier.h&quot;
</span><span class="cx"> #import &quot;RemoteLayerTreeTransaction.h&quot;
</span><span class="cx"> #import &quot;ShareableBitmap.h&quot;
</span><span class="lines">@@ -46,15 +45,13 @@
</span><span class="cx">     : m_webPageProxy(webPageProxy)
</span><span class="cx">     , m_rootLayer(nullptr)
</span><span class="cx"> {
</span><del>-    m_webPageProxy-&gt;process().addMessageReceiver(Messages::RemoteLayerTreeHost::messageReceiverName(), m_webPageProxy-&gt;pageID(), *this);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RemoteLayerTreeHost::~RemoteLayerTreeHost()
</span><span class="cx"> {
</span><del>-    m_webPageProxy-&gt;process().removeMessageReceiver(Messages::RemoteLayerTreeHost::messageReceiverName(), m_webPageProxy-&gt;pageID());
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerTreeHost::commit(const RemoteLayerTreeTransaction&amp; transaction)
</del><ins>+void RemoteLayerTreeHost::updateLayerTree(const RemoteLayerTreeTransaction&amp; transaction)
</ins><span class="cx"> {
</span><span class="cx">     LOG(RemoteLayerTree, &quot;%s&quot;, transaction.description().data());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -50,6 +50,8 @@
</span><span class="cx">                 0F174AA3142A4CB70039250F /* APIGeometry.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F174AA2142A4CB60039250F /* APIGeometry.h */; };
</span><span class="cx">                 0F174AA7142AAC610039250F /* WKGeometry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F174AA6142AAC610039250F /* WKGeometry.cpp */; };
</span><span class="cx">                 0FB659231208B4DB0044816C /* DrawingAreaInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB659221208B4DB0044816C /* DrawingAreaInfo.h */; };
</span><ins>+                0FF24A2D1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FF24A2B1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessageReceiver.cpp */; };
+                0FF24A2E1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF24A2C1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessages.h */; };
</ins><span class="cx">                 1A043976124D034800FFBFB5 /* PluginProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A043974124D034800FFBFB5 /* PluginProcess.h */; };
</span><span class="cx">                 1A043977124D034800FFBFB5 /* PluginProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A043975124D034800FFBFB5 /* PluginProcess.cpp */; };
</span><span class="cx">                 1A043A09124D11A900FFBFB5 /* WebProcessConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A043A07124D11A900FFBFB5 /* WebProcessConnection.h */; };
</span><span class="lines">@@ -208,8 +210,6 @@
</span><span class="cx">                 1AA2E51E12E4C05E00BC4966 /* CGUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA2E51C12E4C05E00BC4966 /* CGUtilities.cpp */; };
</span><span class="cx">                 1AA3D75B1651B44F008713D0 /* RemoteLayerTreeHost.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA3D7591651B44F008713D0 /* RemoteLayerTreeHost.mm */; };
</span><span class="cx">                 1AA3D75C1651B44F008713D0 /* RemoteLayerTreeHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA3D75A1651B44F008713D0 /* RemoteLayerTreeHost.h */; };
</span><del>-                1AA3D7611651B7D3008713D0 /* RemoteLayerTreeHostMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA3D75F1651B7D3008713D0 /* RemoteLayerTreeHostMessageReceiver.cpp */; };
-                1AA3D7621651B7D3008713D0 /* RemoteLayerTreeHostMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA3D7601651B7D3008713D0 /* RemoteLayerTreeHostMessages.h */; };
</del><span class="cx">                 1AA417CB12C00CCA002BE67B /* TextChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA417C912C00CCA002BE67B /* TextChecker.h */; };
</span><span class="cx">                 1AA417EF12C00D87002BE67B /* TextCheckerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA417ED12C00D87002BE67B /* TextCheckerMac.mm */; };
</span><span class="cx">                 1AA41AB512C02EC4002BE67B /* EditorState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA41AB412C02EC4002BE67B /* EditorState.h */; };
</span><span class="lines">@@ -1588,6 +1588,9 @@
</span><span class="cx">                 0F174AA2142A4CB60039250F /* APIGeometry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIGeometry.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F174AA6142AAC610039250F /* WKGeometry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKGeometry.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0FB659221208B4DB0044816C /* DrawingAreaInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingAreaInfo.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                0FF24A2B1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteLayerTreeDrawingAreaProxyMessageReceiver.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0FF24A2C1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteLayerTreeDrawingAreaProxyMessages.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                0FF24A2F1879E4FE003ABF0C /* RemoteLayerTreeDrawingAreaProxy.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = RemoteLayerTreeDrawingAreaProxy.messages.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = &quot;&lt;absolute&gt;&quot;; };
</span><span class="cx">                 1A043974124D034800FFBFB5 /* PluginProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginProcess.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A043975124D034800FFBFB5 /* PluginProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginProcess.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -1769,9 +1772,6 @@
</span><span class="cx">                 1AA2E51C12E4C05E00BC4966 /* CGUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CGUtilities.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AA3D7591651B44F008713D0 /* RemoteLayerTreeHost.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteLayerTreeHost.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AA3D75A1651B44F008713D0 /* RemoteLayerTreeHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteLayerTreeHost.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                1AA3D75D1651B5C5008713D0 /* RemoteLayerTreeHost.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RemoteLayerTreeHost.messages.in; sourceTree = &quot;&lt;group&gt;&quot;; };
-                1AA3D75F1651B7D3008713D0 /* RemoteLayerTreeHostMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteLayerTreeHostMessageReceiver.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                1AA3D7601651B7D3008713D0 /* RemoteLayerTreeHostMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteLayerTreeHostMessages.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 1AA417C912C00CCA002BE67B /* TextChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextChecker.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AA417ED12C00D87002BE67B /* TextCheckerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TextCheckerMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AA41AB412C02EC4002BE67B /* EditorState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditorState.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -5359,10 +5359,10 @@
</span><span class="cx">                                 868160CD18763D4B0021E79D /* WindowServerConnection.h */,
</span><span class="cx">                                 B878B613133428DC006888E9 /* CorrectionPanel.h */,
</span><span class="cx">                                 B878B614133428DC006888E9 /* CorrectionPanel.mm */,
</span><ins>+                                0FF24A2F1879E4FE003ABF0C /* RemoteLayerTreeDrawingAreaProxy.messages.in */,
</ins><span class="cx">                                 1AB16AE01648656D00290D62 /* RemoteLayerTreeDrawingAreaProxy.h */,
</span><span class="cx">                                 1AB16ADF1648656D00290D62 /* RemoteLayerTreeDrawingAreaProxy.mm */,
</span><span class="cx">                                 1AA3D75A1651B44F008713D0 /* RemoteLayerTreeHost.h */,
</span><del>-                                1AA3D75D1651B5C5008713D0 /* RemoteLayerTreeHost.messages.in */,
</del><span class="cx">                                 1AA3D7591651B44F008713D0 /* RemoteLayerTreeHost.mm */,
</span><span class="cx">                                 E18E6909169B563F009B6670 /* SecItemShimProxy.cpp */,
</span><span class="cx">                                 E18E690A169B563F009B6670 /* SecItemShimProxy.h */,
</span><span class="lines">@@ -5543,10 +5543,10 @@
</span><span class="cx">                                 1A043B5C124D5E9D00FFBFB5 /* PluginProcessProxyMessages.h */,
</span><span class="cx">                                 1A8EFA6E1252B84100F7067F /* PluginProxyMessageReceiver.cpp */,
</span><span class="cx">                                 1A8EFA6F1252B84100F7067F /* PluginProxyMessages.h */,
</span><del>-                                1AA3D75F1651B7D3008713D0 /* RemoteLayerTreeHostMessageReceiver.cpp */,
-                                1AA3D7601651B7D3008713D0 /* RemoteLayerTreeHostMessages.h */,
</del><span class="cx">                                 1AC1338318590C4600F3EC05 /* RemoteObjectRegistryMessageReceiver.cpp */,
</span><span class="cx">                                 1AC1338418590C4600F3EC05 /* RemoteObjectRegistryMessages.h */,
</span><ins>+                                0FF24A2B1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessageReceiver.cpp */,
+                                0FF24A2C1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessages.h */,
</ins><span class="cx">                                 E18E6911169B667B009B6670 /* SecItemShimMessageReceiver.cpp */,
</span><span class="cx">                                 E18E6912169B667B009B6670 /* SecItemShimMessages.h */,
</span><span class="cx">                                 E18E6913169B667B009B6670 /* SecItemShimProxyMessageReceiver.cpp */,
</span><span class="lines">@@ -5952,7 +5952,6 @@
</span><span class="cx">                                 1AB16ADE1648598400290D62 /* RemoteLayerTreeDrawingArea.h in Headers */,
</span><span class="cx">                                 1AB16AE21648656D00290D62 /* RemoteLayerTreeDrawingAreaProxy.h in Headers */,
</span><span class="cx">                                 1AA3D75C1651B44F008713D0 /* RemoteLayerTreeHost.h in Headers */,
</span><del>-                                1AA3D7621651B7D3008713D0 /* RemoteLayerTreeHostMessages.h in Headers */,
</del><span class="cx">                                 1AF1AC6C1651759E00C17D7F /* RemoteLayerTreeTransaction.h in Headers */,
</span><span class="cx">                                 E1B78471163F24690007B692 /* RemoteNetworkingContext.h in Headers */,
</span><span class="cx">                                 1A30066E1110F4F70031937C /* ResponsivenessTimer.h in Headers */,
</span><span class="lines">@@ -6196,6 +6195,7 @@
</span><span class="cx">                                 37C4C0951814B9E6003688B9 /* WKBackForwardListInternal.h in Headers */,
</span><span class="cx">                                 BC646C1D11DD399F006455B0 /* WKBackForwardListItemRef.h in Headers */,
</span><span class="cx">                                 1AB474DA184D44250051B622 /* WKBundlePageResourceLoadClient.h in Headers */,
</span><ins>+                                0FF24A2E1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessages.h in Headers */,
</ins><span class="cx">                                 BCDDB317124EBD130048D13C /* WKBase.h in Headers */,
</span><span class="cx">                                 7CD5EBBB1746A83E000C1C45 /* WKBaseMac.h in Headers */,
</span><span class="cx">                                 BCBAAC73144E619E0053F82F /* WKBrowsingContextController.h in Headers */,
</span><span class="lines">@@ -7131,6 +7131,7 @@
</span><span class="cx">                                 2989A411167D1834004F96D2 /* CustomProtocolManagerMac.mm in Sources */,
</span><span class="cx">                                 2984F588164BA095004BC0C6 /* CustomProtocolManagerMessageReceiver.cpp in Sources */,
</span><span class="cx">                                 29AD3096164B4C930072DEA9 /* CustomProtocolManagerProxyMac.mm in Sources */,
</span><ins>+                                0FF24A2D1879E4BC003ABF0C /* RemoteLayerTreeDrawingAreaProxyMessageReceiver.cpp in Sources */,
</ins><span class="cx">                                 2984F57C164B915F004BC0C6 /* CustomProtocolManagerProxyMessageReceiver.cpp in Sources */,
</span><span class="cx">                                 93FC67BD12D3CCF200A60610 /* DecoderAdapter.cpp in Sources */,
</span><span class="cx">                                 BCE81D98131AE02100241910 /* DictionaryPopupInfo.cpp in Sources */,
</span><span class="lines">@@ -7316,7 +7317,6 @@
</span><span class="cx">                                 1AB16ADD1648598400290D62 /* RemoteLayerTreeDrawingArea.mm in Sources */,
</span><span class="cx">                                 1AB16AE11648656D00290D62 /* RemoteLayerTreeDrawingAreaProxy.mm in Sources */,
</span><span class="cx">                                 1AA3D75B1651B44F008713D0 /* RemoteLayerTreeHost.mm in Sources */,
</span><del>-                                1AA3D7611651B7D3008713D0 /* RemoteLayerTreeHostMessageReceiver.cpp in Sources */,
</del><span class="cx">                                 1AF1AC6B1651759E00C17D7F /* RemoteLayerTreeTransaction.mm in Sources */,
</span><span class="cx">                                 E1B78473163F253E0007B692 /* RemoteNetworkingContext.mm in Sources */,
</span><span class="cx">                                 BC111B09112F5E3C00337BAB /* ResponsivenessTimer.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -61,6 +61,8 @@
</span><span class="cx">     static std::unique_ptr&lt;DrawingArea&gt; create(WebPage*, const WebPageCreationParameters&amp;);
</span><span class="cx">     virtual ~DrawingArea();
</span><span class="cx">     
</span><ins>+    DrawingAreaType type() const { return m_type; }
+    
</ins><span class="cx">     void didReceiveDrawingAreaMessage(IPC::Connection*, IPC::MessageDecoder&amp;);
</span><span class="cx"> 
</span><span class="cx">     virtual void setNeedsDisplay() = 0;
</span><span class="lines">@@ -106,7 +108,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void dispatchAfterEnsuringUpdatedScrollPosition(const Function&lt;void ()&gt;&amp;);
</span><span class="cx"> 
</span><del>-    virtual void viewStateDidChange(ViewState::Flags changed) { }
</del><ins>+    virtual void viewStateDidChange(ViewState::Flags) { }
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     DrawingArea(DrawingAreaType, WebPage*);
</span><span class="lines">@@ -132,6 +134,9 @@
</span><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+#define DRAWING_AREA_TYPE_CASTS(ToValueTypeName, predicate) \
+    TYPE_CASTS_BASE(ToValueTypeName, DrawingArea, value, value-&gt;predicate, value.predicate)
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #endif // DrawingArea_h
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacGraphicsLayerCARemoteh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -50,6 +50,8 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span><ins>+    virtual bool isGraphicsLayerCARemote() const { return true; }
+
</ins><span class="cx">     virtual PassRefPtr&lt;WebCore::PlatformCALayer&gt; createPlatformCALayer(WebCore::PlatformCALayer::LayerType, WebCore::PlatformCALayerClient* owner) OVERRIDE;
</span><span class="cx">     virtual PassRefPtr&lt;WebCore::PlatformCALayer&gt; createPlatformCALayer(PlatformLayer*, WebCore::PlatformCALayerClient* owner) OVERRIDE;
</span><span class="cx"> 
</span><span class="lines">@@ -62,6 +64,8 @@
</span><span class="cx">     RemoteLayerTreeContext* m_context;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+GRAPHICSLAYER_TYPE_CASTS(GraphicsLayerCARemote, isGraphicsLayerCARemote());
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #endif // USE(ACCELERATED_COMPOSITING)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -153,7 +153,7 @@
</span><span class="cx">     PlatformCALayerRemote(WebCore::PlatformCALayer::LayerType, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext* context);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    virtual bool isPlatformCALayerRemote() const OVERRIDE { return false; }
</del><ins>+    virtual bool isPlatformCALayerRemote() const OVERRIDE { return true; }
</ins><span class="cx">     void ensureBackingStore();
</span><span class="cx">     void removeSublayer(PlatformCALayerRemote*);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #include &quot;WebPage.h&quot;
</span><span class="cx"> #include &lt;WebCore/GraphicsLayerFactory.h&gt;
</span><span class="cx"> #include &lt;WebCore/PlatformCALayer.h&gt;
</span><del>-#include &lt;WebCore/Timer.h&gt;
</del><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -39,15 +38,12 @@
</span><span class="cx"> class PlatformCALayerRemote;
</span><span class="cx"> class WebPage;
</span><span class="cx"> 
</span><ins>+// FIXME: This class doesn't do much now. Roll into RemoteLayerTreeDrawingArea?
</ins><span class="cx"> class RemoteLayerTreeContext : public WebCore::GraphicsLayerFactory {
</span><span class="cx"> public:
</span><span class="cx">     explicit RemoteLayerTreeContext(WebPage*);
</span><span class="cx">     ~RemoteLayerTreeContext();
</span><span class="cx"> 
</span><del>-    void setRootLayer(WebCore::GraphicsLayer*);
-
-    void scheduleLayerFlush();
-
</del><span class="cx">     void layerWasCreated(PlatformCALayerRemote*, WebCore::PlatformCALayer::LayerType);
</span><span class="cx">     void layerWillBeDestroyed(PlatformCALayerRemote*);
</span><span class="cx"> 
</span><span class="lines">@@ -56,28 +52,20 @@
</span><span class="cx"> 
</span><span class="cx">     LayerHostingMode layerHostingMode() const { return m_webPage-&gt;layerHostingMode(); }
</span><span class="cx"> 
</span><del>-    void setIsFlushingSuspended(bool);
</del><ins>+    void flushOutOfTreeLayers();
+    void buildTransaction(RemoteLayerTreeTransaction&amp;, WebCore::PlatformCALayer&amp; rootLayer);
</ins><span class="cx"> 
</span><del>-    void forceRepaint();
-
</del><span class="cx"> private:
</span><span class="cx">     // WebCore::GraphicsLayerFactory
</span><span class="cx">     virtual std::unique_ptr&lt;WebCore::GraphicsLayer&gt; createGraphicsLayer(WebCore::GraphicsLayerClient*) OVERRIDE;
</span><span class="cx"> 
</span><del>-    void layerFlushTimerFired(WebCore::Timer&lt;RemoteLayerTreeContext&gt;*);
-    void flushLayers();
-
</del><span class="cx">     WebPage* m_webPage;
</span><del>-    WebCore::Timer&lt;RemoteLayerTreeContext&gt; m_layerFlushTimer;
</del><span class="cx"> 
</span><span class="cx">     RefPtr&lt;PlatformCALayerRemote&gt; m_rootLayer;
</span><span class="cx">     Vector&lt;WebCore::GraphicsLayer*&gt; m_outOfTreeLayers;
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;RemoteLayerTreeTransaction::LayerCreationProperties&gt; m_createdLayers;
</span><span class="cx">     Vector&lt;WebCore::GraphicsLayer::PlatformLayerID&gt; m_destroyedLayers;
</span><del>-
-    bool m_isFlushingSuspended;
-    bool m_hasDeferredFlush;
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeContextmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx"> #import &quot;GraphicsLayerCARemote.h&quot;
</span><span class="cx"> #import &quot;PlatformCALayerRemote.h&quot;
</span><span class="cx"> #import &quot;RemoteLayerTreeTransaction.h&quot;
</span><del>-#import &quot;RemoteLayerTreeHostMessages.h&quot;
</del><span class="cx"> #import &quot;WebPage.h&quot;
</span><span class="cx"> #import &lt;WebCore/FrameView.h&gt;
</span><span class="cx"> #import &lt;WebCore/MainFrame.h&gt;
</span><span class="lines">@@ -43,9 +42,6 @@
</span><span class="cx"> 
</span><span class="cx"> RemoteLayerTreeContext::RemoteLayerTreeContext(WebPage* webPage)
</span><span class="cx">     : m_webPage(webPage)
</span><del>-    , m_layerFlushTimer(this, &amp;RemoteLayerTreeContext::layerFlushTimerFired)
-    , m_isFlushingSuspended(false)
-    , m_hasDeferredFlush(false)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -53,16 +49,6 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerTreeContext::setRootLayer(GraphicsLayer* rootLayer)
-{
-    if (!rootLayer) {
-        m_rootLayer = nullptr;
-        return;
-    }
-
-    m_rootLayer = static_cast&lt;PlatformCALayerRemote*&gt;(static_cast&lt;GraphicsLayerCARemote*&gt;(rootLayer)-&gt;platformCALayer());
-}
-
</del><span class="cx"> void RemoteLayerTreeContext::layerWasCreated(PlatformCALayerRemote* layer, PlatformCALayer::LayerType type)
</span><span class="cx"> {
</span><span class="cx">     RemoteLayerTreeTransaction::LayerCreationProperties creationProperties;
</span><span class="lines">@@ -94,78 +80,26 @@
</span><span class="cx">     m_outOfTreeLayers.remove(layerIndex);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerTreeContext::scheduleLayerFlush()
-{
-    if (m_layerFlushTimer.isActive())
-        return;
-
-    m_layerFlushTimer.startOneShot(0);
-}
-
</del><span class="cx"> std::unique_ptr&lt;GraphicsLayer&gt; RemoteLayerTreeContext::createGraphicsLayer(GraphicsLayerClient* client)
</span><span class="cx"> {
</span><span class="cx">     return std::make_unique&lt;GraphicsLayerCARemote&gt;(client, this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerTreeContext::layerFlushTimerFired(WebCore::Timer&lt;RemoteLayerTreeContext&gt;*)
</del><ins>+void RemoteLayerTreeContext::flushOutOfTreeLayers()
</ins><span class="cx"> {
</span><del>-    flushLayers();
-}
-
-void RemoteLayerTreeContext::flushLayers()
-{
-    if (!m_rootLayer)
-        return;
-
-    if (m_isFlushingSuspended) {
-        m_hasDeferredFlush = true;
-        return;
-    }
-
-    RemoteLayerTreeTransaction transaction;
-
-    transaction.setRootLayerID(m_rootLayer-&gt;layerID());
-
-    m_webPage-&gt;layoutIfNeeded();
-    m_webPage-&gt;corePage()-&gt;mainFrame().view()-&gt;flushCompositingStateIncludingSubframes();
-
</del><span class="cx">     for (const auto&amp; layer : m_outOfTreeLayers)
</span><span class="cx">         layer-&gt;flushCompositingStateForThisLayerOnly();
</span><ins>+}
</ins><span class="cx"> 
</span><ins>+void RemoteLayerTreeContext::buildTransaction(RemoteLayerTreeTransaction&amp; transaction, PlatformCALayer&amp; rootLayer)
+{
+    PlatformCALayerRemote&amp; rootLayerRemote = toPlatformCALayerRemote(rootLayer);
+    transaction.setRootLayerID(rootLayerRemote.layerID());
+    
</ins><span class="cx">     transaction.setCreatedLayers(std::move(m_createdLayers));
</span><span class="cx">     transaction.setDestroyedLayerIDs(std::move(m_destroyedLayers));
</span><del>-    m_rootLayer-&gt;recursiveBuildTransaction(transaction);
</del><span class="cx"> 
</span><del>-    m_webPage-&gt;send(Messages::RemoteLayerTreeHost::Commit(transaction));
</del><ins>+    rootLayerRemote.recursiveBuildTransaction(transaction);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerTreeContext::setIsFlushingSuspended(bool isFrozen)
-{
-    if (m_isFlushingSuspended == isFrozen)
-        return;
-
-    m_isFlushingSuspended = isFrozen;
-
-    if (!m_isFlushingSuspended &amp;&amp; m_hasDeferredFlush) {
-        m_hasDeferredFlush = false;
-        scheduleLayerFlush();
-    }
-}
-
-void RemoteLayerTreeContext::forceRepaint()
-{
-    if (m_isFlushingSuspended)
-        return;
-
-    for (Frame* frame = &amp;m_webPage-&gt;corePage()-&gt;mainFrame(); frame; frame = frame-&gt;tree().traverseNext()) {
-        FrameView* frameView = frame-&gt;view();
-        if (!frameView || !frameView-&gt;tiledBacking())
-            continue;
-
-        frameView-&gt;tiledBacking()-&gt;forceRepaint();
-    }
-
-    flushLayers();
-}
-
</del><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include &quot;DrawingArea.h&quot;
</span><span class="cx"> #include &quot;GraphicsLayerCARemote.h&quot;
</span><span class="cx"> #include &lt;WebCore/GraphicsLayerClient.h&gt;
</span><ins>+#include &lt;WebCore/Timer.h&gt;
</ins><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -86,6 +87,9 @@
</span><span class="cx">     void updateMainFrameClipsToExposedRect();
</span><span class="cx">     void updateScrolledExposedRect();
</span><span class="cx"> 
</span><ins>+    void layerFlushTimerFired(WebCore::Timer&lt;RemoteLayerTreeDrawingArea&gt;*);
+    void flushLayers();
+
</ins><span class="cx">     WebCore::TiledBacking* mainFrameTiledBacking() const;
</span><span class="cx"> 
</span><span class="cx">     std::unique_ptr&lt;RemoteLayerTreeContext&gt; m_remoteLayerTreeContext;
</span><span class="lines">@@ -98,8 +102,14 @@
</span><span class="cx">     WebCore::FloatRect m_exposedRect;
</span><span class="cx">     WebCore::FloatRect m_scrolledExposedRect;
</span><span class="cx">     bool m_clipsToExposedRect;
</span><ins>+
+    WebCore::Timer&lt;RemoteLayerTreeDrawingArea&gt; m_layerFlushTimer;
+    bool m_isFlushingSuspended;
+    bool m_hasDeferredFlush;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><ins>+DRAWING_AREA_TYPE_CASTS(RemoteLayerTreeDrawingArea, type() == DrawingAreaTypeRemoteLayerTree);
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #endif // RemoteLayerTreeDrawingArea_h
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (161326 => 161327)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2014-01-06 01:29:24 UTC (rev 161326)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2014-01-06 04:08:30 UTC (rev 161327)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #import &quot;DrawingAreaProxyMessages.h&quot;
</span><span class="cx"> #import &quot;GraphicsLayerCARemote.h&quot;
</span><span class="cx"> #import &quot;RemoteLayerTreeContext.h&quot;
</span><ins>+#import &quot;RemoteLayerTreeDrawingAreaProxyMessages.h&quot;
</ins><span class="cx"> #import &quot;WebPage.h&quot;
</span><span class="cx"> #import &lt;WebCore/Frame.h&gt;
</span><span class="cx"> #import &lt;WebCore/FrameView.h&gt;
</span><span class="lines">@@ -44,6 +45,9 @@
</span><span class="cx">     : DrawingArea(DrawingAreaTypeRemoteLayerTree, webPage)
</span><span class="cx">     , m_remoteLayerTreeContext(std::make_unique&lt;RemoteLayerTreeContext&gt;(webPage))
</span><span class="cx">     , m_clipsToExposedRect(false)
</span><ins>+    , m_layerFlushTimer(this, &amp;RemoteLayerTreeDrawingArea::layerFlushTimerFired)
+    , m_isFlushingSuspended(false)
+    , m_hasDeferredFlush(false)
</ins><span class="cx"> {
</span><span class="cx">     webPage-&gt;corePage()-&gt;settings().setForceCompositingMode(true);
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -75,16 +79,9 @@
</span><span class="cx"> 
</span><span class="cx"> void RemoteLayerTreeDrawingArea::setRootCompositingLayer(GraphicsLayer* rootLayer)
</span><span class="cx"> {
</span><del>-    m_rootLayer = rootLayer ? static_cast&lt;GraphicsLayerCARemote*&gt;(rootLayer)-&gt;platformCALayer() : nullptr;
-
-    m_remoteLayerTreeContext-&gt;setRootLayer(rootLayer);
</del><ins>+    m_rootLayer = rootLayer ? toGraphicsLayerCARemote(rootLayer)-&gt;platformCALayer() : nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush()
-{
-    m_remoteLayerTreeContext-&gt;scheduleLayerFlush();
-}
-
</del><span class="cx"> void RemoteLayerTreeDrawingArea::updateGeometry(const IntSize&amp; viewSize, const IntSize&amp; layerPosition)
</span><span class="cx"> {
</span><span class="cx">     m_viewSize = viewSize;
</span><span class="lines">@@ -202,12 +199,31 @@
</span><span class="cx"> 
</span><span class="cx"> void RemoteLayerTreeDrawingArea::setLayerTreeStateIsFrozen(bool isFrozen)
</span><span class="cx"> {
</span><del>-    m_remoteLayerTreeContext-&gt;setIsFlushingSuspended(isFrozen);
</del><ins>+    if (m_isFlushingSuspended == isFrozen)
+        return;
+
+    m_isFlushingSuspended = isFrozen;
+
+    if (!m_isFlushingSuspended &amp;&amp; m_hasDeferredFlush) {
+        m_hasDeferredFlush = false;
+        scheduleCompositingLayerFlush();
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RemoteLayerTreeDrawingArea::forceRepaint()
</span><span class="cx"> {
</span><del>-    m_remoteLayerTreeContext-&gt;forceRepaint();
</del><ins>+    if (m_isFlushingSuspended)
+        return;
+
+    for (Frame* frame = &amp;m_webPage-&gt;corePage()-&gt;mainFrame(); frame; frame = frame-&gt;tree().traverseNext()) {
+        FrameView* frameView = frame-&gt;view();
+        if (!frameView || !frameView-&gt;tiledBacking())
+            continue;
+
+        frameView-&gt;tiledBacking()-&gt;forceRepaint();
+    }
+
+    flushLayers();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RemoteLayerTreeDrawingArea::setExposedRect(const FloatRect&amp; exposedRect)
</span><span class="lines">@@ -269,4 +285,41 @@
</span><span class="cx">     return frameView ? frameView-&gt;tiledBacking() : 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush()
+{
+    if (m_layerFlushTimer.isActive())
+        return;
+
+    m_layerFlushTimer.startOneShot(0);
+}
+
+void RemoteLayerTreeDrawingArea::layerFlushTimerFired(WebCore::Timer&lt;RemoteLayerTreeDrawingArea&gt;*)
+{
+    flushLayers();
+}
+
+void RemoteLayerTreeDrawingArea::flushLayers()
+{
+    if (!m_rootLayer)
+        return;
+
+    if (m_isFlushingSuspended) {
+        m_hasDeferredFlush = true;
+        return;
+    }
+
+    m_webPage-&gt;layoutIfNeeded();
+    m_webPage-&gt;corePage()-&gt;mainFrame().view()-&gt;flushCompositingStateIncludingSubframes();
+
+    m_remoteLayerTreeContext-&gt;flushOutOfTreeLayers();
+
+    ASSERT(m_rootLayer);
+
+    // FIXME: minize these transactions if nothing changed.
+    RemoteLayerTreeTransaction layerTransaction;
+    m_remoteLayerTreeContext-&gt;buildTransaction(layerTransaction, *m_rootLayer);
+
+    m_webPage-&gt;send(Messages::RemoteLayerTreeDrawingAreaProxy::CommitLayerTree(layerTransaction));
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre>
</div>
</div>

</body>
</html>