<!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>[204249] trunk/Source/WebKit2</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/204249">204249</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2016-08-07 22:38:27 -0700 (Sun, 07 Aug 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Duplicated code in DrawingAreaProxyImpl and CoordinatedDrawingAreaProxy
https://bugs.webkit.org/show_bug.cgi?id=160506

Reviewed by Michael Catanzaro.

Same logic as in <a href="http://trac.webkit.org/projects/webkit/changeset/202855">r202855</a> but in the UI process. CoordinatedDrawingAreaProxy is just a copy paste of
DrawingAreaProxyImpl with non-accelerated code path removed. There's actually nothing (or very little) specific
to coordinated graphics in the CoordinatedDrawingAreaProxy implementation. This patch renames
CoordinatedDrawingAreaProxy as AcceleratedDrawingAreaProxy and makes DrawingAreaProxyImpl inherit from it, so
that in case of accelerated compositing the parent class is used, and DrawingAreaProxyImpl only adds the non
accelerated code path.
To simplify the common API of AcceleratedDrawingAreaProxy, I have changed CoordinatedLayerTreeHostProxy to
receive a WebPageProxy in the constructor instead of a drawing area, since the drawing area was used just to get
the page proxy.

* PlatformEfl.cmake:
* PlatformGTK.cmake:
* UIProcess/AcceleratedDrawingAreaProxy.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp.
(WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy):
(WebKit::AcceleratedDrawingAreaProxy::~AcceleratedDrawingAreaProxy):
(WebKit::AcceleratedDrawingAreaProxy::alwaysUseCompositing):
(WebKit::AcceleratedDrawingAreaProxy::dispatchAfterEnsuringDrawing):
(WebKit::AcceleratedDrawingAreaProxy::sizeDidChange):
(WebKit::AcceleratedDrawingAreaProxy::deviceScaleFactorDidChange):
(WebKit::AcceleratedDrawingAreaProxy::visibilityDidChange):
(WebKit::AcceleratedDrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint):
(WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState):
(WebKit::AcceleratedDrawingAreaProxy::enterAcceleratedCompositingMode):
(WebKit::AcceleratedDrawingAreaProxy::exitAcceleratedCompositingMode):
(WebKit::AcceleratedDrawingAreaProxy::updateAcceleratedCompositingMode):
(WebKit::AcceleratedDrawingAreaProxy::backingStoreStateDidChange):
(WebKit::AcceleratedDrawingAreaProxy::sendUpdateBackingStoreState):
(WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
(WebKit::AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing):
(WebKit::AcceleratedDrawingAreaProxy::destroyNativeSurfaceHandleForCompositing):
* UIProcess/AcceleratedDrawingAreaProxy.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h.
(WebKit::AcceleratedDrawingAreaProxy::isInAcceleratedCompositingMode):
(WebKit::AcceleratedDrawingAreaProxy::coordinatedLayerTreeHostProxy):
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
(WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy):
(WebKit::CoordinatedLayerTreeHostProxy::~CoordinatedLayerTreeHostProxy):
(WebKit::CoordinatedLayerTreeHostProxy::updateViewport):
(WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
(WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
(WebKit::CoordinatedLayerTreeHostProxy::renderNextFrame):
(WebKit::CoordinatedLayerTreeHostProxy::commitScrollOffset):
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
* UIProcess/CoordinatedGraphics/PageViewportController.cpp:
(WebKit::PageViewportController::syncVisibleContents):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
(WebKit::DrawingAreaProxyImpl::paint):
(WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
(WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl): Deleted.
(WebKit::DrawingAreaProxyImpl::update): Deleted.
(WebKit::DrawingAreaProxyImpl::incorporateUpdate): Deleted.
(WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon): Deleted.
(WebKit::DrawingAreaProxyImpl::discardBackingStore): Deleted.
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/efl/WebView.cpp:
(WebKit::WebView::setVisible):
(WebKit::WebView::coordinatedGraphicsScene):
(WebKit::WebView::updateViewportSize):
(WebKit::WebView::createDrawingAreaProxy):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformEflcmake">trunk/Source/WebKit2/PlatformEfl.cmake</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCoordinatedGraphicsCoordinatedLayerTreeHostProxycpp">trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCoordinatedGraphicsCoordinatedLayerTreeHostProxyh">trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCoordinatedGraphicsPageViewportControllercpp">trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/PageViewportController.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDrawingAreaProxyImplcpp">trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDrawingAreaProxyImplh">trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcesseflWebViewcpp">trunk/Source/WebKit2/UIProcess/efl/WebView.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAcceleratedDrawingAreaProxycpp">trunk/Source/WebKit2/UIProcess/AcceleratedDrawingAreaProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAcceleratedDrawingAreaProxyh">trunk/Source/WebKit2/UIProcess/AcceleratedDrawingAreaProxy.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessCoordinatedGraphicsCoordinatedDrawingAreaProxycpp">trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCoordinatedGraphicsCoordinatedDrawingAreaProxyh">trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (204248 => 204249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-08-08 02:48:56 UTC (rev 204248)
+++ trunk/Source/WebKit2/ChangeLog        2016-08-08 05:38:27 UTC (rev 204249)
</span><span class="lines">@@ -1,3 +1,72 @@
</span><ins>+2016-08-07  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        Duplicated code in DrawingAreaProxyImpl and CoordinatedDrawingAreaProxy
+        https://bugs.webkit.org/show_bug.cgi?id=160506
+
+        Reviewed by Michael Catanzaro.
+
+        Same logic as in r202855 but in the UI process. CoordinatedDrawingAreaProxy is just a copy paste of
+        DrawingAreaProxyImpl with non-accelerated code path removed. There's actually nothing (or very little) specific
+        to coordinated graphics in the CoordinatedDrawingAreaProxy implementation. This patch renames
+        CoordinatedDrawingAreaProxy as AcceleratedDrawingAreaProxy and makes DrawingAreaProxyImpl inherit from it, so
+        that in case of accelerated compositing the parent class is used, and DrawingAreaProxyImpl only adds the non
+        accelerated code path.
+        To simplify the common API of AcceleratedDrawingAreaProxy, I have changed CoordinatedLayerTreeHostProxy to
+        receive a WebPageProxy in the constructor instead of a drawing area, since the drawing area was used just to get
+        the page proxy.
+
+        * PlatformEfl.cmake:
+        * PlatformGTK.cmake:
+        * UIProcess/AcceleratedDrawingAreaProxy.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp.
+        (WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy):
+        (WebKit::AcceleratedDrawingAreaProxy::~AcceleratedDrawingAreaProxy):
+        (WebKit::AcceleratedDrawingAreaProxy::alwaysUseCompositing):
+        (WebKit::AcceleratedDrawingAreaProxy::dispatchAfterEnsuringDrawing):
+        (WebKit::AcceleratedDrawingAreaProxy::sizeDidChange):
+        (WebKit::AcceleratedDrawingAreaProxy::deviceScaleFactorDidChange):
+        (WebKit::AcceleratedDrawingAreaProxy::visibilityDidChange):
+        (WebKit::AcceleratedDrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint):
+        (WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState):
+        (WebKit::AcceleratedDrawingAreaProxy::enterAcceleratedCompositingMode):
+        (WebKit::AcceleratedDrawingAreaProxy::exitAcceleratedCompositingMode):
+        (WebKit::AcceleratedDrawingAreaProxy::updateAcceleratedCompositingMode):
+        (WebKit::AcceleratedDrawingAreaProxy::backingStoreStateDidChange):
+        (WebKit::AcceleratedDrawingAreaProxy::sendUpdateBackingStoreState):
+        (WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
+        (WebKit::AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing):
+        (WebKit::AcceleratedDrawingAreaProxy::destroyNativeSurfaceHandleForCompositing):
+        * UIProcess/AcceleratedDrawingAreaProxy.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h.
+        (WebKit::AcceleratedDrawingAreaProxy::isInAcceleratedCompositingMode):
+        (WebKit::AcceleratedDrawingAreaProxy::coordinatedLayerTreeHostProxy):
+        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
+        (WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy):
+        (WebKit::CoordinatedLayerTreeHostProxy::~CoordinatedLayerTreeHostProxy):
+        (WebKit::CoordinatedLayerTreeHostProxy::updateViewport):
+        (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
+        (WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
+        (WebKit::CoordinatedLayerTreeHostProxy::renderNextFrame):
+        (WebKit::CoordinatedLayerTreeHostProxy::commitScrollOffset):
+        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
+        * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
+        (WebKit::PageViewportController::syncVisibleContents):
+        * UIProcess/DrawingAreaProxyImpl.cpp:
+        (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
+        (WebKit::DrawingAreaProxyImpl::paint):
+        (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
+        (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
+        (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
+        (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl): Deleted.
+        (WebKit::DrawingAreaProxyImpl::update): Deleted.
+        (WebKit::DrawingAreaProxyImpl::incorporateUpdate): Deleted.
+        (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon): Deleted.
+        (WebKit::DrawingAreaProxyImpl::discardBackingStore): Deleted.
+        * UIProcess/DrawingAreaProxyImpl.h:
+        * UIProcess/efl/WebView.cpp:
+        (WebKit::WebView::setVisible):
+        (WebKit::WebView::coordinatedGraphicsScene):
+        (WebKit::WebView::updateViewportSize):
+        (WebKit::WebView::createDrawingAreaProxy):
+
</ins><span class="cx"> 2016-08-07  Dan Bernstein  &lt;mitz@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Cocoa] Reply block leaks if the remote object doesn’t call it
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformEflcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformEfl.cmake (204248 => 204249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformEfl.cmake        2016-08-08 02:48:56 UTC (rev 204248)
+++ trunk/Source/WebKit2/PlatformEfl.cmake        2016-08-08 05:38:27 UTC (rev 204249)
</span><span class="lines">@@ -54,6 +54,7 @@
</span><span class="cx"> 
</span><span class="cx">     Shared/unix/ChildProcessMain.cpp
</span><span class="cx"> 
</span><ins>+    UIProcess/AcceleratedDrawingAreaProxy.cpp
</ins><span class="cx">     UIProcess/BackingStore.cpp
</span><span class="cx">     UIProcess/DefaultUndoController.cpp
</span><span class="cx">     UIProcess/LegacySessionStateCodingNone.cpp
</span><span class="lines">@@ -112,7 +113,6 @@
</span><span class="cx">     UIProcess/API/efl/ewk_view.cpp
</span><span class="cx">     UIProcess/API/efl/ewk_window_features.cpp
</span><span class="cx"> 
</span><del>-    UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp
</del><span class="cx">     UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp
</span><span class="cx">     UIProcess/CoordinatedGraphics/PageViewportController.cpp
</span><span class="cx">     UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (204248 => 204249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake        2016-08-08 02:48:56 UTC (rev 204248)
+++ trunk/Source/WebKit2/PlatformGTK.cmake        2016-08-08 05:38:27 UTC (rev 204249)
</span><span class="lines">@@ -81,6 +81,7 @@
</span><span class="cx"> 
</span><span class="cx">     Shared/unix/ChildProcessMain.cpp
</span><span class="cx"> 
</span><ins>+    UIProcess/AcceleratedDrawingAreaProxy.cpp
</ins><span class="cx">     UIProcess/BackingStore.cpp
</span><span class="cx">     UIProcess/DefaultUndoController.cpp
</span><span class="cx">     UIProcess/DrawingAreaProxyImpl.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAcceleratedDrawingAreaProxycppfromrev204248trunkSourceWebKit2UIProcessCoordinatedGraphicsCoordinatedDrawingAreaProxycpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/AcceleratedDrawingAreaProxy.cpp (from rev 204248, trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp) (0 => 204249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/AcceleratedDrawingAreaProxy.cpp                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/AcceleratedDrawingAreaProxy.cpp        2016-08-08 05:38:27 UTC (rev 204249)
</span><span class="lines">@@ -0,0 +1,273 @@
</span><ins>+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * 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.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;AcceleratedDrawingAreaProxy.h&quot;
+
+#include &quot;DrawingAreaMessages.h&quot;
+#include &quot;DrawingAreaProxyMessages.h&quot;
+#include &quot;LayerTreeContext.h&quot;
+#include &quot;UpdateInfo.h&quot;
+#include &quot;WebPageProxy.h&quot;
+#include &quot;WebPreferences.h&quot;
+#include &quot;WebProcessProxy.h&quot;
+#include &lt;WebCore/Region.h&gt;
+
+#if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
+#include &quot;CoordinatedLayerTreeHostProxy.h&quot;
+#endif
+
+using namespace WebCore;
+
+namespace WebKit {
+
+AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy(WebPageProxy&amp; webPageProxy)
+#if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
+    : DrawingAreaProxy(DrawingAreaTypeCoordinated, webPageProxy)
+#else
+    : DrawingAreaProxy(DrawingAreaTypeImpl, webPageProxy)
+#endif
+{
+#if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
+    // Construct the proxy early to allow messages to be sent to the web process while AC is entered there.
+    m_coordinatedLayerTreeHostProxy = std::make_unique&lt;CoordinatedLayerTreeHostProxy&gt;(webPageProxy);
+#endif
+}
+
+AcceleratedDrawingAreaProxy::~AcceleratedDrawingAreaProxy()
+{
+    // Make sure to exit accelerated compositing mode.
+    if (isInAcceleratedCompositingMode())
+        exitAcceleratedCompositingMode();
+}
+
+bool AcceleratedDrawingAreaProxy::alwaysUseCompositing() const
+{
+    return m_webPageProxy.preferences().acceleratedCompositingEnabled() &amp;&amp; m_webPageProxy.preferences().forceCompositingMode();
+}
+
+void AcceleratedDrawingAreaProxy::dispatchAfterEnsuringDrawing(std::function&lt;void(CallbackBase::Error)&gt; callbackFunction)
+{
+    if (!m_webPageProxy.isValid()) {
+        callbackFunction(CallbackBase::Error::OwnerWasInvalidated);
+        return;
+    }
+
+    RunLoop::main().dispatch([callbackFunction] {
+        callbackFunction(CallbackBase::Error::None);
+    });
+}
+
+void AcceleratedDrawingAreaProxy::sizeDidChange()
+{
+    backingStoreStateDidChange(RespondImmediately);
+}
+
+void AcceleratedDrawingAreaProxy::deviceScaleFactorDidChange()
+{
+    backingStoreStateDidChange(RespondImmediately);
+}
+
+void AcceleratedDrawingAreaProxy::visibilityDidChange()
+{
+    // If we don't have a backing store, go ahead and mark the backing store as being changed so
+    // that when paint we'll actually wait for something to paint and not flash white.
+    if (m_layerTreeContext.isEmpty())
+        backingStoreStateDidChange(DoNotRespondImmediately);
+}
+
+void AcceleratedDrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint()
+{
+    m_hasReceivedFirstUpdate = true;
+}
+
+void AcceleratedDrawingAreaProxy::didUpdateBackingStoreState(uint64_t backingStoreStateID, const UpdateInfo&amp; updateInfo, const LayerTreeContext&amp; layerTreeContext)
+{
+    ASSERT_ARG(backingStoreStateID, backingStoreStateID &lt;= m_nextBackingStoreStateID);
+    ASSERT_ARG(backingStoreStateID, backingStoreStateID &gt; m_currentBackingStoreStateID);
+    m_currentBackingStoreStateID = backingStoreStateID;
+
+    m_isWaitingForDidUpdateBackingStoreState = false;
+
+    // Stop the responsiveness timer that was started in sendUpdateBackingStoreState.
+    m_webPageProxy.process().responsivenessTimer().stop();
+
+    if (layerTreeContext != m_layerTreeContext) {
+        if (layerTreeContext.isEmpty() &amp;&amp; !m_layerTreeContext.isEmpty()) {
+            exitAcceleratedCompositingMode();
+            ASSERT(m_layerTreeContext.isEmpty());
+        } else if (!layerTreeContext.isEmpty() &amp;&amp; m_layerTreeContext.isEmpty()) {
+            enterAcceleratedCompositingMode(layerTreeContext);
+            ASSERT(layerTreeContext == m_layerTreeContext);
+        } else {
+            updateAcceleratedCompositingMode(layerTreeContext);
+            ASSERT(layerTreeContext == m_layerTreeContext);
+        }
+    }
+
+    if (m_nextBackingStoreStateID != m_currentBackingStoreStateID)
+        sendUpdateBackingStoreState(RespondImmediately);
+    else {
+        m_hasReceivedFirstUpdate = true;
+
+#if USE(TEXTURE_MAPPER) &amp;&amp; PLATFORM(GTK) &amp;&amp; !USE(REDIRECTED_XCOMPOSITE_WINDOW)
+        if (m_pendingNativeSurfaceHandleForCompositing) {
+            setNativeSurfaceHandleForCompositing(m_pendingNativeSurfaceHandleForCompositing);
+            m_pendingNativeSurfaceHandleForCompositing = 0;
+        }
+#endif
+    }
+}
+
+void AcceleratedDrawingAreaProxy::enterAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&amp; layerTreeContext)
+{
+    ASSERT_ARG(backingStoreStateID, backingStoreStateID &lt;= m_currentBackingStoreStateID);
+    if (backingStoreStateID &lt; m_currentBackingStoreStateID)
+        return;
+
+    enterAcceleratedCompositingMode(layerTreeContext);
+}
+
+void AcceleratedDrawingAreaProxy::exitAcceleratedCompositingMode(uint64_t backingStoreStateID, const UpdateInfo&amp; updateInfo)
+{
+    ASSERT_ARG(backingStoreStateID, backingStoreStateID &lt;= m_currentBackingStoreStateID);
+    if (backingStoreStateID &lt; m_currentBackingStoreStateID)
+        return;
+
+    exitAcceleratedCompositingMode();
+}
+
+void AcceleratedDrawingAreaProxy::updateAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&amp; layerTreeContext)
+{
+    ASSERT_ARG(backingStoreStateID, backingStoreStateID &lt;= m_currentBackingStoreStateID);
+    if (backingStoreStateID &lt; m_currentBackingStoreStateID)
+        return;
+
+    updateAcceleratedCompositingMode(layerTreeContext);
+}
+
+void AcceleratedDrawingAreaProxy::backingStoreStateDidChange(RespondImmediatelyOrNot respondImmediatelyOrNot)
+{
+    ++m_nextBackingStoreStateID;
+    sendUpdateBackingStoreState(respondImmediatelyOrNot);
+}
+
+void AcceleratedDrawingAreaProxy::sendUpdateBackingStoreState(RespondImmediatelyOrNot respondImmediatelyOrNot)
+{
+    ASSERT(m_currentBackingStoreStateID &lt; m_nextBackingStoreStateID);
+
+    if (!m_webPageProxy.isValid())
+        return;
+
+    if (m_isWaitingForDidUpdateBackingStoreState)
+        return;
+
+    if (m_webPageProxy.viewSize().isEmpty() &amp;&amp; !m_webPageProxy.useFixedLayout())
+        return;
+
+    m_isWaitingForDidUpdateBackingStoreState = respondImmediatelyOrNot == RespondImmediately;
+
+    m_webPageProxy.process().send(Messages::DrawingArea::UpdateBackingStoreState(m_nextBackingStoreStateID, respondImmediatelyOrNot == RespondImmediately, m_webPageProxy.deviceScaleFactor(), m_size, m_scrollOffset), m_webPageProxy.pageID());
+    m_scrollOffset = IntSize();
+
+    if (m_isWaitingForDidUpdateBackingStoreState) {
+        // Start the responsiveness timer. We will stop it when we hear back from the WebProcess
+        // in didUpdateBackingStoreState.
+        m_webPageProxy.process().responsivenessTimer().start();
+    }
+
+    if (m_isWaitingForDidUpdateBackingStoreState &amp;&amp; !m_layerTreeContext.isEmpty()) {
+        // Wait for the DidUpdateBackingStoreState message. Normally we do this in AcceleratedDrawingAreaProxy::paint, but that
+        // function is never called when in accelerated compositing mode.
+        waitForAndDispatchDidUpdateBackingStoreState();
+    }
+}
+
+void AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState()
+{
+    ASSERT(m_isWaitingForDidUpdateBackingStoreState);
+
+    if (!m_webPageProxy.isValid())
+        return;
+    if (m_webPageProxy.process().state() == WebProcessProxy::State::Launching)
+        return;
+
+    // FIXME: waitForAndDispatchImmediately will always return the oldest DidUpdateBackingStoreState message that
+    // hasn't yet been processed. But it might be better to skip ahead to some other DidUpdateBackingStoreState
+    // message, if multiple DidUpdateBackingStoreState messages are waiting to be processed. For instance, we could
+    // choose the most recent one, or the one that is closest to our current size.
+
+    // The timeout, in seconds, we use when waiting for a DidUpdateBackingStoreState message when we're asked to paint.
+    m_webPageProxy.process().connection()-&gt;waitForAndDispatchImmediately&lt;Messages::DrawingAreaProxy::DidUpdateBackingStoreState&gt;(m_webPageProxy.pageID(), std::chrono::milliseconds(500));
+}
+
+void AcceleratedDrawingAreaProxy::enterAcceleratedCompositingMode(const LayerTreeContext&amp; layerTreeContext)
+{
+    ASSERT(alwaysUseCompositing() || !isInAcceleratedCompositingMode());
+
+    m_layerTreeContext = layerTreeContext;
+    m_webPageProxy.enterAcceleratedCompositingMode(layerTreeContext);
+}
+
+void AcceleratedDrawingAreaProxy::exitAcceleratedCompositingMode()
+{
+    ASSERT(isInAcceleratedCompositingMode());
+
+    m_layerTreeContext = LayerTreeContext();
+    m_webPageProxy.exitAcceleratedCompositingMode();
+}
+
+void AcceleratedDrawingAreaProxy::updateAcceleratedCompositingMode(const LayerTreeContext&amp; layerTreeContext)
+{
+    ASSERT(isInAcceleratedCompositingMode());
+
+    m_layerTreeContext = layerTreeContext;
+    m_webPageProxy.updateAcceleratedCompositingMode(layerTreeContext);
+}
+
+#if USE(TEXTURE_MAPPER) &amp;&amp; PLATFORM(GTK) &amp;&amp; !USE(REDIRECTED_XCOMPOSITE_WINDOW)
+void AcceleratedDrawingAreaProxy::setNativeSurfaceHandleForCompositing(uint64_t handle)
+{
+    if (!m_hasReceivedFirstUpdate) {
+        m_pendingNativeSurfaceHandleForCompositing = handle;
+        return;
+    }
+    m_webPageProxy.process().send(Messages::DrawingArea::SetNativeSurfaceHandleForCompositing(handle), m_webPageProxy.pageID(), IPC::DispatchMessageEvenWhenWaitingForSyncReply);
+}
+
+void AcceleratedDrawingAreaProxy::destroyNativeSurfaceHandleForCompositing()
+{
+    if (m_pendingNativeSurfaceHandleForCompositing) {
+        m_pendingNativeSurfaceHandleForCompositing = 0;
+        return;
+    }
+    bool handled;
+    m_webPageProxy.process().sendSync(Messages::DrawingArea::DestroyNativeSurfaceHandleForCompositing(), Messages::DrawingArea::DestroyNativeSurfaceHandleForCompositing::Reply(handled), m_webPageProxy.pageID());
+}
+#endif
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAcceleratedDrawingAreaProxyhfromrev204248trunkSourceWebKit2UIProcessCoordinatedGraphicsCoordinatedDrawingAreaProxyh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/AcceleratedDrawingAreaProxy.h (from rev 204248, trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h) (0 => 204249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/AcceleratedDrawingAreaProxy.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/AcceleratedDrawingAreaProxy.h        2016-08-08 05:38:27 UTC (rev 204249)
</span><span class="lines">@@ -0,0 +1,108 @@
</span><ins>+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include &quot;DrawingAreaProxy.h&quot;
+#include &quot;LayerTreeContext.h&quot;
+
+namespace WebKit {
+
+class CoordinatedLayerTreeHostProxy;
+
+class AcceleratedDrawingAreaProxy : public DrawingAreaProxy {
+public:
+    explicit AcceleratedDrawingAreaProxy(WebPageProxy&amp;);
+    virtual ~AcceleratedDrawingAreaProxy();
+
+    bool isInAcceleratedCompositingMode() const { return alwaysUseCompositing() || !m_layerTreeContext.isEmpty(); }
+    void visibilityDidChange();
+
+#if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
+    CoordinatedLayerTreeHostProxy&amp; coordinatedLayerTreeHostProxy() const { return *m_coordinatedLayerTreeHostProxy.get(); }
+#endif
+
+#if USE(TEXTURE_MAPPER) &amp;&amp; PLATFORM(GTK) &amp;&amp; !USE(REDIRECTED_XCOMPOSITE_WINDOW)
+    void setNativeSurfaceHandleForCompositing(uint64_t);
+    void destroyNativeSurfaceHandleForCompositing();
+#endif
+
+    void dispatchAfterEnsuringDrawing(std::function&lt;void(CallbackBase::Error)&gt;) override;
+
+protected:
+    // DrawingAreaProxy
+    void sizeDidChange() override;
+    void deviceScaleFactorDidChange() override;
+    void waitForBackingStoreUpdateOnNextPaint() override;
+
+    // IPC message handlers
+    void didUpdateBackingStoreState(uint64_t backingStoreStateID, const UpdateInfo&amp;, const LayerTreeContext&amp;) override;
+    void enterAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&amp;) override;
+    void exitAcceleratedCompositingMode(uint64_t backingStoreStateID, const UpdateInfo&amp;) override;
+    void updateAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&amp;) override;
+
+    enum RespondImmediatelyOrNot { DoNotRespondImmediately, RespondImmediately };
+    void backingStoreStateDidChange(RespondImmediatelyOrNot);
+    void sendUpdateBackingStoreState(RespondImmediatelyOrNot);
+    void waitForAndDispatchDidUpdateBackingStoreState();
+
+    virtual void enterAcceleratedCompositingMode(const LayerTreeContext&amp;);
+    void exitAcceleratedCompositingMode();
+    void updateAcceleratedCompositingMode(const LayerTreeContext&amp;);
+
+    bool alwaysUseCompositing() const;
+
+#if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
+    std::unique_ptr&lt;CoordinatedLayerTreeHostProxy&gt; m_coordinatedLayerTreeHostProxy;
+#endif
+
+    // The state ID corresponding to our current backing store. Updated whenever we allocate
+    // a new backing store. Any messages received that correspond to an earlier state are ignored,
+    // as they don't apply to our current backing store.
+    uint64_t m_currentBackingStoreStateID { 0 };
+
+    // The next backing store state ID we will request the web process update to. Incremented
+    // whenever our state changes in a way that will require a new backing store to be allocated.
+    uint64_t m_nextBackingStoreStateID { 0 };
+
+    // The current layer tree context.
+    LayerTreeContext m_layerTreeContext;
+
+    // Whether we've sent a UpdateBackingStoreState message and are now waiting for a DidUpdateBackingStoreState message.
+    // Used to throttle UpdateBackingStoreState messages so we don't send them faster than the Web process can handle.
+    bool m_isWaitingForDidUpdateBackingStoreState { false };
+
+    // For a new Drawing Area don't draw anything until the WebProcess has sent over the first content.
+    bool m_hasReceivedFirstUpdate { false };
+
+#if USE(TEXTURE_MAPPER) &amp;&amp; PLATFORM(GTK) &amp;&amp; !USE(REDIRECTED_XCOMPOSITE_WINDOW)
+    uint64_t m_pendingNativeSurfaceHandleForCompositing { 0 };
+#endif
+};
+
+} // namespace WebKit
+
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCoordinatedGraphicsCoordinatedDrawingAreaProxycpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp (204248 => 204249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp        2016-08-08 02:48:56 UTC (rev 204248)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp        2016-08-08 05:38:27 UTC (rev 204249)
</span><span class="lines">@@ -1,251 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
- * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
- *
- * 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.
- */
-
-#include &quot;config.h&quot;
-
-#if USE(COORDINATED_GRAPHICS)
-#include &quot;CoordinatedDrawingAreaProxy.h&quot;
-
-#include &quot;CoordinatedLayerTreeHostProxy.h&quot;
-#include &quot;DrawingAreaMessages.h&quot;
-#include &quot;DrawingAreaProxyMessages.h&quot;
-#include &quot;LayerTreeContext.h&quot;
-#include &quot;UpdateInfo.h&quot;
-#include &quot;WebPageGroup.h&quot;
-#include &quot;WebPageProxy.h&quot;
-#include &quot;WebPreferences.h&quot;
-#include &quot;WebProcessProxy.h&quot;
-#include &lt;WebCore/Region.h&gt;
-
-using namespace WebCore;
-
-namespace WebKit {
-
-CoordinatedDrawingAreaProxy::CoordinatedDrawingAreaProxy(WebPageProxy&amp; webPageProxy)
-    : DrawingAreaProxy(DrawingAreaTypeCoordinated, webPageProxy)
-    , m_currentBackingStoreStateID(0)
-    , m_nextBackingStoreStateID(0)
-    , m_isWaitingForDidUpdateBackingStoreState(false)
-    , m_hasReceivedFirstUpdate(false)
-{
-    // Construct the proxy early to allow messages to be sent to the web process while AC is entered there.
-    m_coordinatedLayerTreeHostProxy = std::make_unique&lt;CoordinatedLayerTreeHostProxy&gt;(this);
-}
-
-CoordinatedDrawingAreaProxy::~CoordinatedDrawingAreaProxy()
-{
-    // Make sure to exit accelerated compositing mode.
-    if (isInAcceleratedCompositingMode())
-        exitAcceleratedCompositingMode();
-}
-
-void CoordinatedDrawingAreaProxy::updateViewport()
-{
-    m_webPageProxy.setViewNeedsDisplay(viewportVisibleRect());
-}
-
-WebCore::IntRect CoordinatedDrawingAreaProxy::contentsRect() const
-{
-    return IntRect(IntPoint::zero(), m_webPageProxy.viewSize());
-}
-
-void CoordinatedDrawingAreaProxy::dispatchAfterEnsuringDrawing(std::function&lt;void(CallbackBase::Error)&gt; callbackFunction)
-{
-    if (!m_webPageProxy.isValid()) {
-        callbackFunction(CallbackBase::Error::OwnerWasInvalidated);
-        return;
-    }
-
-    RunLoop::main().dispatch([callbackFunction] {
-        callbackFunction(CallbackBase::Error::None);
-    });
-}
-
-void CoordinatedDrawingAreaProxy::sizeDidChange()
-{
-    backingStoreStateDidChange(RespondImmediately);
-}
-
-void CoordinatedDrawingAreaProxy::deviceScaleFactorDidChange()
-{
-    backingStoreStateDidChange(RespondImmediately);
-}
-
-void CoordinatedDrawingAreaProxy::visibilityDidChange()
-{
-    // If we don't have a backing store, go ahead and mark the backing store as being changed so
-    // that when paint we'll actually wait for something to paint and not flash white.
-    if (m_layerTreeContext.isEmpty())
-        backingStoreStateDidChange(DoNotRespondImmediately);
-}
-
-void CoordinatedDrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint()
-{
-    m_hasReceivedFirstUpdate = true;
-}
-
-void CoordinatedDrawingAreaProxy::didUpdateBackingStoreState(uint64_t backingStoreStateID, const UpdateInfo&amp; updateInfo, const LayerTreeContext&amp; layerTreeContext)
-{
-    ASSERT_ARG(backingStoreStateID, backingStoreStateID &lt;= m_nextBackingStoreStateID);
-    ASSERT_ARG(backingStoreStateID, backingStoreStateID &gt; m_currentBackingStoreStateID);
-    m_currentBackingStoreStateID = backingStoreStateID;
-
-    m_isWaitingForDidUpdateBackingStoreState = false;
-
-    // Stop the responsiveness timer that was started in sendUpdateBackingStoreState.
-    m_webPageProxy.process().responsivenessTimer().stop();
-
-    if (layerTreeContext != m_layerTreeContext) {
-        if (!m_layerTreeContext.isEmpty()) {
-            exitAcceleratedCompositingMode();
-            ASSERT(m_layerTreeContext.isEmpty());
-        }
-
-        if (!layerTreeContext.isEmpty()) {
-            enterAcceleratedCompositingMode(layerTreeContext);
-            ASSERT(layerTreeContext == m_layerTreeContext);
-        }
-    }
-
-    if (m_nextBackingStoreStateID != m_currentBackingStoreStateID)
-        sendUpdateBackingStoreState(RespondImmediately);
-    else
-        m_hasReceivedFirstUpdate = true;
-}
-
-void CoordinatedDrawingAreaProxy::enterAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&amp; layerTreeContext)
-{
-    ASSERT_ARG(backingStoreStateID, backingStoreStateID &lt;= m_currentBackingStoreStateID);
-    if (backingStoreStateID &lt; m_currentBackingStoreStateID)
-        return;
-
-    enterAcceleratedCompositingMode(layerTreeContext);
-}
-
-void CoordinatedDrawingAreaProxy::exitAcceleratedCompositingMode(uint64_t backingStoreStateID, const UpdateInfo&amp; updateInfo)
-{
-    ASSERT_ARG(backingStoreStateID, backingStoreStateID &lt;= m_currentBackingStoreStateID);
-    if (backingStoreStateID &lt; m_currentBackingStoreStateID)
-        return;
-
-    exitAcceleratedCompositingMode();
-}
-
-void CoordinatedDrawingAreaProxy::updateAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&amp; layerTreeContext)
-{
-    ASSERT_ARG(backingStoreStateID, backingStoreStateID &lt;= m_currentBackingStoreStateID);
-    if (backingStoreStateID &lt; m_currentBackingStoreStateID)
-        return;
-
-    updateAcceleratedCompositingMode(layerTreeContext);
-}
-
-void CoordinatedDrawingAreaProxy::backingStoreStateDidChange(RespondImmediatelyOrNot respondImmediatelyOrNot)
-{
-    ++m_nextBackingStoreStateID;
-    sendUpdateBackingStoreState(respondImmediatelyOrNot);
-}
-
-void CoordinatedDrawingAreaProxy::sendUpdateBackingStoreState(RespondImmediatelyOrNot respondImmediatelyOrNot)
-{
-    ASSERT(m_currentBackingStoreStateID &lt; m_nextBackingStoreStateID);
-
-    if (!m_webPageProxy.isValid())
-        return;
-
-    if (m_isWaitingForDidUpdateBackingStoreState)
-        return;
-
-    if (m_webPageProxy.viewSize().isEmpty() &amp;&amp; !m_webPageProxy.useFixedLayout())
-        return;
-
-    m_isWaitingForDidUpdateBackingStoreState = respondImmediatelyOrNot == RespondImmediately;
-
-    m_webPageProxy.process().send(Messages::DrawingArea::UpdateBackingStoreState(m_nextBackingStoreStateID, respondImmediatelyOrNot == RespondImmediately, m_webPageProxy.deviceScaleFactor(), m_size, m_scrollOffset), m_webPageProxy.pageID());
-    m_scrollOffset = IntSize();
-
-    if (m_isWaitingForDidUpdateBackingStoreState) {
-        // Start the responsiveness timer. We will stop it when we hear back from the WebProcess
-        // in didUpdateBackingStoreState.
-        m_webPageProxy.process().responsivenessTimer().start();
-    }
-
-    if (m_isWaitingForDidUpdateBackingStoreState &amp;&amp; !m_layerTreeContext.isEmpty()) {
-        // Wait for the DidUpdateBackingStoreState message. Normally we do this in CoordinatedDrawingAreaProxy::paint, but that
-        // function is never called when in accelerated compositing mode.
-        waitForAndDispatchDidUpdateBackingStoreState();
-    }
-}
-
-void CoordinatedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState()
-{
-    ASSERT(m_isWaitingForDidUpdateBackingStoreState);
-
-    if (!m_webPageProxy.isValid())
-        return;
-    if (m_webPageProxy.process().state() == WebProcessProxy::State::Launching)
-        return;
-
-    // FIXME: waitForAndDispatchImmediately will always return the oldest DidUpdateBackingStoreState message that
-    // hasn't yet been processed. But it might be better to skip ahead to some other DidUpdateBackingStoreState
-    // message, if multiple DidUpdateBackingStoreState messages are waiting to be processed. For instance, we could
-    // choose the most recent one, or the one that is closest to our current size.
-
-    // The timeout, in seconds, we use when waiting for a DidUpdateBackingStoreState message when we're asked to paint.
-    m_webPageProxy.process().connection()-&gt;waitForAndDispatchImmediately&lt;Messages::DrawingAreaProxy::DidUpdateBackingStoreState&gt;(m_webPageProxy.pageID(), std::chrono::milliseconds(500));
-}
-
-void CoordinatedDrawingAreaProxy::enterAcceleratedCompositingMode(const LayerTreeContext&amp; layerTreeContext)
-{
-    ASSERT(!isInAcceleratedCompositingMode());
-
-    m_layerTreeContext = layerTreeContext;
-    m_webPageProxy.enterAcceleratedCompositingMode(layerTreeContext);
-}
-
-void CoordinatedDrawingAreaProxy::setVisibleContentsRect(const WebCore::FloatRect&amp; visibleContentsRect, const WebCore::FloatPoint&amp; trajectoryVector)
-{
-    m_coordinatedLayerTreeHostProxy-&gt;setVisibleContentsRect(visibleContentsRect, trajectoryVector);
-}
-
-void CoordinatedDrawingAreaProxy::exitAcceleratedCompositingMode()
-{
-    ASSERT(isInAcceleratedCompositingMode());
-
-    m_layerTreeContext = LayerTreeContext();
-    m_webPageProxy.exitAcceleratedCompositingMode();
-}
-
-void CoordinatedDrawingAreaProxy::updateAcceleratedCompositingMode(const LayerTreeContext&amp; layerTreeContext)
-{
-    ASSERT(isInAcceleratedCompositingMode());
-
-    m_layerTreeContext = layerTreeContext;
-    m_webPageProxy.updateAcceleratedCompositingMode(layerTreeContext);
-}
-
-} // namespace WebKit
-#endif // USE(COORDINATED_GRAPHICS)
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCoordinatedGraphicsCoordinatedDrawingAreaProxyh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h (204248 => 204249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h        2016-08-08 02:48:56 UTC (rev 204248)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h        2016-08-08 05:38:27 UTC (rev 204249)
</span><span class="lines">@@ -1,114 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
- * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
- *
- * 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.
- */
-
-#ifndef CoordinatedDrawingAreaProxy_h
-#define CoordinatedDrawingAreaProxy_h
-
-#if USE(COORDINATED_GRAPHICS)
-
-#include &quot;BackingStore.h&quot;
-#include &quot;DrawingAreaProxy.h&quot;
-#include &quot;LayerTreeContext.h&quot;
-#include &lt;wtf/RunLoop.h&gt;
-
-namespace WebCore {
-class Region;
-}
-
-namespace WebKit {
-
-class CoordinatedLayerTreeHostProxy;
-
-class CoordinatedDrawingAreaProxy : public DrawingAreaProxy {
-public:
-    explicit CoordinatedDrawingAreaProxy(WebPageProxy&amp;);
-    virtual ~CoordinatedDrawingAreaProxy();
-
-    bool isInAcceleratedCompositingMode() const { return !m_layerTreeContext.isEmpty(); }
-    void visibilityDidChange();
-
-    void setVisibleContentsRect(const WebCore::FloatRect&amp; visibleContentsRect, const WebCore::FloatPoint&amp; trajectory);
-
-    bool hasReceivedFirstUpdate() const { return m_hasReceivedFirstUpdate; }
-
-    CoordinatedLayerTreeHostProxy&amp; coordinatedLayerTreeHostProxy() const { return *m_coordinatedLayerTreeHostProxy.get(); }
-
-    WebCore::IntRect viewportVisibleRect() const { return contentsRect(); }
-    WebCore::IntRect contentsRect() const;
-    void updateViewport();
-
-    WebPageProxy&amp; page() { return m_webPageProxy; }
-    
-    void dispatchAfterEnsuringDrawing(std::function&lt;void(CallbackBase::Error)&gt;) override;
-
-private:
-    // DrawingAreaProxy
-    virtual void sizeDidChange();
-    virtual void deviceScaleFactorDidChange();
-
-    virtual void waitForBackingStoreUpdateOnNextPaint();
-
-    // IPC message handlers
-    virtual void didUpdateBackingStoreState(uint64_t backingStoreStateID, const UpdateInfo&amp;, const LayerTreeContext&amp;);
-    virtual void enterAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&amp;);
-    virtual void exitAcceleratedCompositingMode(uint64_t backingStoreStateID, const UpdateInfo&amp;);
-    virtual void updateAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&amp;);
-
-    enum RespondImmediatelyOrNot { DoNotRespondImmediately, RespondImmediately };
-    void backingStoreStateDidChange(RespondImmediatelyOrNot);
-    void sendUpdateBackingStoreState(RespondImmediatelyOrNot);
-    void waitForAndDispatchDidUpdateBackingStoreState();
-
-    void enterAcceleratedCompositingMode(const LayerTreeContext&amp;);
-    void exitAcceleratedCompositingMode();
-    void updateAcceleratedCompositingMode(const LayerTreeContext&amp;);
-
-    std::unique_ptr&lt;CoordinatedLayerTreeHostProxy&gt; m_coordinatedLayerTreeHostProxy;
-
-    // The state ID corresponding to our current backing store. Updated whenever we allocate
-    // a new backing store. Any messages received that correspond to an earlier state are ignored,
-    // as they don't apply to our current backing store.
-    uint64_t m_currentBackingStoreStateID;
-
-    // The next backing store state ID we will request the web process update to. Incremented
-    // whenever our state changes in a way that will require a new backing store to be allocated.
-    uint64_t m_nextBackingStoreStateID;
-
-    // The current layer tree context.
-    LayerTreeContext m_layerTreeContext;
-
-    // Whether we've sent a UpdateBackingStoreState message and are now waiting for a DidUpdateBackingStoreState message.
-    // Used to throttle UpdateBackingStoreState messages so we don't send them faster than the Web process can handle.
-    bool m_isWaitingForDidUpdateBackingStoreState;
-
-    // For a new Drawing Area don't draw anything until the WebProcess has sent over the first content.
-    bool m_hasReceivedFirstUpdate;
-};
-
-} // namespace WebKit
-
-#endif // USE(COORDINATED_GRAPHICS)
-#endif // CoordinatedDrawingAreaProxy_h
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCoordinatedGraphicsCoordinatedLayerTreeHostProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp (204248 => 204249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp        2016-08-08 02:48:56 UTC (rev 204248)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp        2016-08-08 05:38:27 UTC (rev 204249)
</span><span class="lines">@@ -20,10 +20,9 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> 
</span><del>-#if USE(COORDINATED_GRAPHICS)
</del><ins>+#if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
</ins><span class="cx"> #include &quot;CoordinatedLayerTreeHostProxy.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;CoordinatedDrawingAreaProxy.h&quot;
</del><span class="cx"> #include &quot;CoordinatedLayerTreeHostMessages.h&quot;
</span><span class="cx"> #include &quot;CoordinatedLayerTreeHostProxyMessages.h&quot;
</span><span class="cx"> #include &quot;WebPageProxy.h&quot;
</span><span class="lines">@@ -34,22 +33,22 @@
</span><span class="cx"> 
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><del>-CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy(CoordinatedDrawingAreaProxy* drawingAreaProxy)
-    : m_drawingAreaProxy(drawingAreaProxy)
</del><ins>+CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy(WebPageProxy&amp; webPageProxy)
+    : m_webPageProxy(webPageProxy)
</ins><span class="cx">     , m_scene(adoptRef(new CoordinatedGraphicsScene(this)))
</span><span class="cx"> {
</span><del>-    m_drawingAreaProxy-&gt;page().process().addMessageReceiver(Messages::CoordinatedLayerTreeHostProxy::messageReceiverName(), m_drawingAreaProxy-&gt;page().pageID(), *this);
</del><ins>+    m_webPageProxy.process().addMessageReceiver(Messages::CoordinatedLayerTreeHostProxy::messageReceiverName(), m_webPageProxy.pageID(), *this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> CoordinatedLayerTreeHostProxy::~CoordinatedLayerTreeHostProxy()
</span><span class="cx"> {
</span><del>-    m_drawingAreaProxy-&gt;page().process().removeMessageReceiver(Messages::CoordinatedLayerTreeHostProxy::messageReceiverName(), m_drawingAreaProxy-&gt;page().pageID());
</del><ins>+    m_webPageProxy.process().removeMessageReceiver(Messages::CoordinatedLayerTreeHostProxy::messageReceiverName(), m_webPageProxy.pageID());
</ins><span class="cx">     m_scene-&gt;detach();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedLayerTreeHostProxy::updateViewport()
</span><span class="cx"> {
</span><del>-    m_drawingAreaProxy-&gt;updateViewport();
</del><ins>+    m_webPageProxy.setViewNeedsDisplay(IntRect(IntPoint::zero(), m_webPageProxy.viewSize()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedLayerTreeHostProxy::dispatchUpdate(std::function&lt;void()&gt; function)
</span><span class="lines">@@ -65,9 +64,7 @@
</span><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     updateViewport();
</span><del>-#if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
-    m_drawingAreaProxy-&gt;page().didRenderFrame(graphicsState.contentsSize, graphicsState.coveredRect);
-#endif
</del><ins>+    m_webPageProxy.didRenderFrame(graphicsState.contentsSize, graphicsState.coveredRect);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedLayerTreeHostProxy::setVisibleContentsRect(const FloatRect&amp; rect, const FloatPoint&amp; trajectoryVector)
</span><span class="lines">@@ -75,7 +72,7 @@
</span><span class="cx">     if (rect == m_lastSentVisibleRect &amp;&amp; trajectoryVector == m_lastSentTrajectoryVector)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_drawingAreaProxy-&gt;page().process().send(Messages::CoordinatedLayerTreeHost::SetVisibleContentsRect(rect, trajectoryVector), m_drawingAreaProxy-&gt;page().pageID());
</del><ins>+    m_webPageProxy.process().send(Messages::CoordinatedLayerTreeHost::SetVisibleContentsRect(rect, trajectoryVector), m_webPageProxy.pageID());
</ins><span class="cx">     m_lastSentVisibleRect = rect;
</span><span class="cx">     m_lastSentTrajectoryVector = trajectoryVector;
</span><span class="cx"> }
</span><span class="lines">@@ -82,13 +79,13 @@
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedLayerTreeHostProxy::renderNextFrame()
</span><span class="cx"> {
</span><del>-    m_drawingAreaProxy-&gt;page().process().send(Messages::CoordinatedLayerTreeHost::RenderNextFrame(), m_drawingAreaProxy-&gt;page().pageID());
</del><ins>+    m_webPageProxy.process().send(Messages::CoordinatedLayerTreeHost::RenderNextFrame(), m_webPageProxy.pageID());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedLayerTreeHostProxy::commitScrollOffset(uint32_t layerID, const IntSize&amp; offset)
</span><span class="cx"> {
</span><del>-    m_drawingAreaProxy-&gt;page().process().send(Messages::CoordinatedLayerTreeHost::CommitScrollOffset(layerID, offset), m_drawingAreaProxy-&gt;page().pageID());
</del><ins>+    m_webPageProxy.process().send(Messages::CoordinatedLayerTreeHost::CommitScrollOffset(layerID, offset), m_webPageProxy.pageID());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span><del>-#endif // USE(COORDINATED_GRAPHICS)
</del><ins>+#endif // USE(COORDINATED_GRAPHICS_MULTIPROCESS)
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCoordinatedGraphicsCoordinatedLayerTreeHostProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h (204248 => 204249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h        2016-08-08 02:48:56 UTC (rev 204248)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h        2016-08-08 05:38:27 UTC (rev 204249)
</span><span class="lines">@@ -35,13 +35,13 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-class CoordinatedDrawingAreaProxy;
</del><ins>+class WebPageProxy;
</ins><span class="cx"> 
</span><span class="cx"> class CoordinatedLayerTreeHostProxy : public CoordinatedGraphicsSceneClient, public IPC::MessageReceiver {
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(CoordinatedLayerTreeHostProxy);
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    explicit CoordinatedLayerTreeHostProxy(CoordinatedDrawingAreaProxy*);
</del><ins>+    explicit CoordinatedLayerTreeHostProxy(WebPageProxy&amp;);
</ins><span class="cx">     virtual ~CoordinatedLayerTreeHostProxy();
</span><span class="cx"> 
</span><span class="cx">     void commitCoordinatedGraphicsState(const WebCore::CoordinatedGraphicsState&amp;);
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx">     // IPC::MessageReceiver
</span><span class="cx">     void didReceiveMessage(IPC::Connection&amp;, IPC::MessageDecoder&amp;) override;
</span><span class="cx"> 
</span><del>-    CoordinatedDrawingAreaProxy* m_drawingAreaProxy;
</del><ins>+    WebPageProxy&amp; m_webPageProxy;
</ins><span class="cx">     RefPtr&lt;CoordinatedGraphicsScene&gt; m_scene;
</span><span class="cx">     WebCore::FloatRect m_lastSentVisibleRect;
</span><span class="cx">     WebCore::FloatPoint m_lastSentTrajectoryVector;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCoordinatedGraphicsPageViewportControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/PageViewportController.cpp (204248 => 204249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/PageViewportController.cpp        2016-08-08 02:48:56 UTC (rev 204248)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/PageViewportController.cpp        2016-08-08 05:38:27 UTC (rev 204249)
</span><span class="lines">@@ -22,7 +22,8 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;PageViewportController.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;CoordinatedDrawingAreaProxy.h&quot;
</del><ins>+#include &quot;AcceleratedDrawingAreaProxy.h&quot;
+#include &quot;CoordinatedLayerTreeHostProxy.h&quot;
</ins><span class="cx"> #include &quot;PageViewportControllerClient.h&quot;
</span><span class="cx"> #include &quot;WebPageProxy.h&quot;
</span><span class="cx"> #include &lt;WebCore/FloatRect.h&gt;
</span><span class="lines">@@ -263,13 +264,13 @@
</span><span class="cx"> 
</span><span class="cx"> bool PageViewportController::syncVisibleContents(const FloatPoint&amp; trajectoryVector)
</span><span class="cx"> {
</span><del>-    CoordinatedDrawingAreaProxy* drawingArea = static_cast&lt;CoordinatedDrawingAreaProxy*&gt;(m_webPageProxy-&gt;drawingArea());
</del><ins>+    auto* drawingArea = static_cast&lt;AcceleratedDrawingAreaProxy*&gt;(m_webPageProxy-&gt;drawingArea());
</ins><span class="cx">     if (!drawingArea || m_viewportSize.isEmpty() || m_contentsSize.isEmpty())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     FloatRect visibleContentsRect(boundContentsPosition(m_contentsPosition), visibleContentsSize());
</span><span class="cx">     visibleContentsRect.intersect(FloatRect(FloatPoint::zero(), m_contentsSize));
</span><del>-    drawingArea-&gt;setVisibleContentsRect(visibleContentsRect, trajectoryVector);
</del><ins>+    drawingArea-&gt;coordinatedLayerTreeHostProxy().setVisibleContentsRect(visibleContentsRect, trajectoryVector);
</ins><span class="cx"> 
</span><span class="cx">     if (!m_layerTreeStateIsFrozen)
</span><span class="cx">         m_client.didChangeVisibleContents();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDrawingAreaProxyImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp (204248 => 204249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp        2016-08-08 02:48:56 UTC (rev 204248)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp        2016-08-08 05:38:27 UTC (rev 204249)
</span><span class="lines">@@ -41,12 +41,7 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> DrawingAreaProxyImpl::DrawingAreaProxyImpl(WebPageProxy&amp; webPageProxy)
</span><del>-    : DrawingAreaProxy(DrawingAreaTypeImpl, webPageProxy)
-    , m_currentBackingStoreStateID(0)
-    , m_nextBackingStoreStateID(0)
-    , m_isWaitingForDidUpdateBackingStoreState(false)
-    , m_hasReceivedFirstUpdate(false)
-    , m_isBackingStoreDiscardable(true)
</del><ins>+    : AcceleratedDrawingAreaProxy(webPageProxy)
</ins><span class="cx">     , m_discardBackingStoreTimer(RunLoop::current(), this, &amp;DrawingAreaProxyImpl::discardBackingStore)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -53,16 +48,8 @@
</span><span class="cx"> 
</span><span class="cx"> DrawingAreaProxyImpl::~DrawingAreaProxyImpl()
</span><span class="cx"> {
</span><del>-    // Make sure to exit accelerated compositing mode.
-    if (isInAcceleratedCompositingMode())
-        exitAcceleratedCompositingMode();
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool DrawingAreaProxyImpl::alwaysUseCompositing() const
-{
-    return m_webPageProxy.preferences().acceleratedCompositingEnabled() &amp;&amp; m_webPageProxy.preferences().forceCompositingMode();
-}
-
</del><span class="cx"> void DrawingAreaProxyImpl::paint(BackingStore::PlatformGraphicsContext context, const IntRect&amp; rect, Region&amp; unpaintedRegion)
</span><span class="cx"> {
</span><span class="cx">     unpaintedRegion = rect;
</span><span class="lines">@@ -78,8 +65,8 @@
</span><span class="cx"> 
</span><span class="cx">         // If we haven't yet received our first bits from the WebProcess then don't paint anything.
</span><span class="cx">         if (!m_hasReceivedFirstUpdate)
</span><del>-            return;        
-        
</del><ins>+            return;
+
</ins><span class="cx">         if (m_isWaitingForDidUpdateBackingStoreState) {
</span><span class="cx">             // Wait for a DidUpdateBackingStoreState message that contains the new bits before we paint
</span><span class="cx">             // what's currently in the backing store.
</span><span class="lines">@@ -106,16 +93,6 @@
</span><span class="cx">     discardBackingStoreSoon();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void DrawingAreaProxyImpl::sizeDidChange()
-{
-    backingStoreStateDidChange(RespondImmediately);
-}
-
-void DrawingAreaProxyImpl::deviceScaleFactorDidChange()
-{
-    backingStoreStateDidChange(RespondImmediately);
-}
-
</del><span class="cx"> void DrawingAreaProxyImpl::setBackingStoreIsDiscardable(bool isBackingStoreDiscardable)
</span><span class="cx"> {
</span><span class="cx">     if (m_isBackingStoreDiscardable == isBackingStoreDiscardable)
</span><span class="lines">@@ -128,11 +105,6 @@
</span><span class="cx">         m_discardBackingStoreTimer.stop();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void DrawingAreaProxyImpl::waitForBackingStoreUpdateOnNextPaint()
-{
-    m_hasReceivedFirstUpdate = true;
-}
-
</del><span class="cx"> void DrawingAreaProxyImpl::update(uint64_t backingStoreStateID, const UpdateInfo&amp; updateInfo)
</span><span class="cx"> {
</span><span class="cx">     ASSERT_ARG(backingStoreStateID, backingStoreStateID &lt;= m_currentBackingStoreStateID);
</span><span class="lines">@@ -147,41 +119,7 @@
</span><span class="cx"> 
</span><span class="cx"> void DrawingAreaProxyImpl::didUpdateBackingStoreState(uint64_t backingStoreStateID, const UpdateInfo&amp; updateInfo, const LayerTreeContext&amp; layerTreeContext)
</span><span class="cx"> {
</span><del>-    ASSERT_ARG(backingStoreStateID, backingStoreStateID &lt;= m_nextBackingStoreStateID);
-    ASSERT_ARG(backingStoreStateID, backingStoreStateID &gt; m_currentBackingStoreStateID);
-    m_currentBackingStoreStateID = backingStoreStateID;
-
-    m_isWaitingForDidUpdateBackingStoreState = false;
-
-    // Stop the responsiveness timer that was started in sendUpdateBackingStoreState.
-    m_webPageProxy.process().responsivenessTimer().stop();
-
-    if (layerTreeContext != m_layerTreeContext) {
-        if (layerTreeContext.isEmpty() &amp;&amp; !m_layerTreeContext.isEmpty()) {
-            exitAcceleratedCompositingMode();
-            ASSERT(m_layerTreeContext.isEmpty());
-        } else if (!layerTreeContext.isEmpty() &amp;&amp; m_layerTreeContext.isEmpty()) {
-            enterAcceleratedCompositingMode(layerTreeContext);
-            ASSERT(layerTreeContext == m_layerTreeContext);
-        } else {
-            updateAcceleratedCompositingMode(layerTreeContext);
-            ASSERT(layerTreeContext == m_layerTreeContext);
-        }
-    }
-
-    if (m_nextBackingStoreStateID != m_currentBackingStoreStateID)
-        sendUpdateBackingStoreState(RespondImmediately);
-    else {
-        m_hasReceivedFirstUpdate = true;
-
-#if USE(TEXTURE_MAPPER) &amp;&amp; PLATFORM(GTK) &amp;&amp; !USE(REDIRECTED_XCOMPOSITE_WINDOW)
-        if (m_pendingNativeSurfaceHandleForCompositing) {
-            setNativeSurfaceHandleForCompositing(m_pendingNativeSurfaceHandleForCompositing);
-            m_pendingNativeSurfaceHandleForCompositing = 0;
-        }
-#endif
-    }
-
</del><ins>+    AcceleratedDrawingAreaProxy::didUpdateBackingStoreState(backingStoreStateID, updateInfo, layerTreeContext);
</ins><span class="cx">     if (isInAcceleratedCompositingMode()) {
</span><span class="cx">         ASSERT(!m_backingStore);
</span><span class="cx">         return;
</span><span class="lines">@@ -193,15 +131,6 @@
</span><span class="cx">     incorporateUpdate(updateInfo);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void DrawingAreaProxyImpl::enterAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&amp; layerTreeContext)
-{
-    ASSERT_ARG(backingStoreStateID, backingStoreStateID &lt;= m_currentBackingStoreStateID);
-    if (backingStoreStateID &lt; m_currentBackingStoreStateID)
-        return;
-
-    enterAcceleratedCompositingMode(layerTreeContext);
-}
-
</del><span class="cx"> void DrawingAreaProxyImpl::exitAcceleratedCompositingMode(uint64_t backingStoreStateID, const UpdateInfo&amp; updateInfo)
</span><span class="cx"> {
</span><span class="cx">     ASSERT_ARG(backingStoreStateID, backingStoreStateID &lt;= m_currentBackingStoreStateID);
</span><span class="lines">@@ -208,20 +137,11 @@
</span><span class="cx">     if (backingStoreStateID &lt; m_currentBackingStoreStateID)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    exitAcceleratedCompositingMode();
</del><ins>+    AcceleratedDrawingAreaProxy::exitAcceleratedCompositingMode();
</ins><span class="cx"> 
</span><span class="cx">     incorporateUpdate(updateInfo);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void DrawingAreaProxyImpl::updateAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&amp; layerTreeContext)
-{
-    ASSERT_ARG(backingStoreStateID, backingStoreStateID &lt;= m_currentBackingStoreStateID);
-    if (backingStoreStateID &lt; m_currentBackingStoreStateID)
-        return;
-
-    updateAcceleratedCompositingMode(layerTreeContext);
-}
-
</del><span class="cx"> void DrawingAreaProxyImpl::incorporateUpdate(const UpdateInfo&amp; updateInfo)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!isInAcceleratedCompositingMode());
</span><span class="lines">@@ -243,117 +163,12 @@
</span><span class="cx">     m_webPageProxy.setViewNeedsDisplay(damageRegion);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void DrawingAreaProxyImpl::backingStoreStateDidChange(RespondImmediatelyOrNot respondImmediatelyOrNot)
-{
-    ++m_nextBackingStoreStateID;
-    sendUpdateBackingStoreState(respondImmediatelyOrNot);
-}
-
-void DrawingAreaProxyImpl::sendUpdateBackingStoreState(RespondImmediatelyOrNot respondImmediatelyOrNot)
-{
-    ASSERT(m_currentBackingStoreStateID &lt; m_nextBackingStoreStateID);
-
-    if (!m_webPageProxy.isValid())
-        return;
-
-    if (m_isWaitingForDidUpdateBackingStoreState)
-        return;
-
-    if (m_webPageProxy.viewSize().isEmpty() &amp;&amp; !m_webPageProxy.useFixedLayout())
-        return;
-
-    m_isWaitingForDidUpdateBackingStoreState = respondImmediatelyOrNot == RespondImmediately;
-
-    m_webPageProxy.process().send(Messages::DrawingArea::UpdateBackingStoreState(m_nextBackingStoreStateID, respondImmediatelyOrNot == RespondImmediately, m_webPageProxy.deviceScaleFactor(), m_size, m_scrollOffset), m_webPageProxy.pageID());
-    m_scrollOffset = IntSize();
-
-    if (m_isWaitingForDidUpdateBackingStoreState) {
-        // Start the responsiveness timer. We will stop it when we hear back from the WebProcess
-        // in didUpdateBackingStoreState.
-        m_webPageProxy.process().responsivenessTimer().start();
-    }
-
-    if (m_isWaitingForDidUpdateBackingStoreState &amp;&amp; !m_layerTreeContext.isEmpty()) {
-        // Wait for the DidUpdateBackingStoreState message. Normally we do this in DrawingAreaProxyImpl::paint, but that
-        // function is never called when in accelerated compositing mode.
-        waitForAndDispatchDidUpdateBackingStoreState();
-    }
-}
-
-void DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState()
-{
-    ASSERT(m_isWaitingForDidUpdateBackingStoreState);
-
-    if (!m_webPageProxy.isValid())
-        return;
-    if (m_webPageProxy.process().state() == WebProcessProxy::State::Launching)
-        return;
-
-    // FIXME: waitForAndDispatchImmediately will always return the oldest DidUpdateBackingStoreState message that
-    // hasn't yet been processed. But it might be better to skip ahead to some other DidUpdateBackingStoreState
-    // message, if multiple DidUpdateBackingStoreState messages are waiting to be processed. For instance, we could
-    // choose the most recent one, or the one that is closest to our current size.
-
-    // The timeout we use when waiting for a DidUpdateBackingStoreState message when we're asked to paint is 500 milliseconds.
-    m_webPageProxy.process().connection()-&gt;waitForAndDispatchImmediately&lt;Messages::DrawingAreaProxy::DidUpdateBackingStoreState&gt;(m_webPageProxy.pageID(), std::chrono::milliseconds(500));
-}
-
</del><span class="cx"> void DrawingAreaProxyImpl::enterAcceleratedCompositingMode(const LayerTreeContext&amp; layerTreeContext)
</span><span class="cx"> {
</span><del>-    ASSERT(alwaysUseCompositing() || !isInAcceleratedCompositingMode());
-
</del><span class="cx">     m_backingStore = nullptr;
</span><del>-    m_layerTreeContext = layerTreeContext;
-    m_webPageProxy.enterAcceleratedCompositingMode(layerTreeContext);
</del><ins>+    AcceleratedDrawingAreaProxy::enterAcceleratedCompositingMode(layerTreeContext);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if USE(TEXTURE_MAPPER) &amp;&amp; PLATFORM(GTK) &amp;&amp; !USE(REDIRECTED_XCOMPOSITE_WINDOW)
-void DrawingAreaProxyImpl::setNativeSurfaceHandleForCompositing(uint64_t handle)
-{
-    if (!m_hasReceivedFirstUpdate) {
-        m_pendingNativeSurfaceHandleForCompositing = handle;
-        return;
-    }
-    m_webPageProxy.process().send(Messages::DrawingArea::SetNativeSurfaceHandleForCompositing(handle), m_webPageProxy.pageID(), IPC::DispatchMessageEvenWhenWaitingForSyncReply);
-}
-
-void DrawingAreaProxyImpl::destroyNativeSurfaceHandleForCompositing()
-{
-    if (m_pendingNativeSurfaceHandleForCompositing) {
-        m_pendingNativeSurfaceHandleForCompositing = 0;
-        return;
-    }
-    bool handled;
-    m_webPageProxy.process().sendSync(Messages::DrawingArea::DestroyNativeSurfaceHandleForCompositing(), Messages::DrawingArea::DestroyNativeSurfaceHandleForCompositing::Reply(handled), m_webPageProxy.pageID());
-}
-#endif
-
-void DrawingAreaProxyImpl::dispatchAfterEnsuringDrawing(std::function&lt;void (CallbackBase::Error)&gt; callbackFunction)
-{
-    if (!m_webPageProxy.isValid()) {
-        callbackFunction(CallbackBase::Error::OwnerWasInvalidated);
-        return;
-    }
-
-    RunLoop::main().dispatch([callbackFunction] { callbackFunction(CallbackBase::Error::None); });
-}
-
-void DrawingAreaProxyImpl::exitAcceleratedCompositingMode()
-{
-    ASSERT(isInAcceleratedCompositingMode());
-
-    m_layerTreeContext = LayerTreeContext();
-    m_webPageProxy.exitAcceleratedCompositingMode();
-}
-
-void DrawingAreaProxyImpl::updateAcceleratedCompositingMode(const LayerTreeContext&amp; layerTreeContext)
-{
-    ASSERT(isInAcceleratedCompositingMode());
-
-    m_layerTreeContext = layerTreeContext;
-    m_webPageProxy.updateAcceleratedCompositingMode(layerTreeContext);
-}
-
</del><span class="cx"> void DrawingAreaProxyImpl::discardBackingStoreSoon()
</span><span class="cx"> {
</span><span class="cx">     if (!m_isBackingStoreDiscardable || m_discardBackingStoreTimer.isActive())
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDrawingAreaProxyImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h (204248 => 204249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h        2016-08-08 02:48:56 UTC (rev 204248)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h        2016-08-08 05:38:27 UTC (rev 204249)
</span><span class="lines">@@ -26,9 +26,9 @@
</span><span class="cx"> #ifndef DrawingAreaProxyImpl_h
</span><span class="cx"> #define DrawingAreaProxyImpl_h
</span><span class="cx"> 
</span><ins>+#include &quot;AcceleratedDrawingAreaProxy.h&quot;
</ins><span class="cx"> #include &quot;BackingStore.h&quot;
</span><span class="cx"> #include &quot;DrawingAreaProxy.h&quot;
</span><del>-#include &quot;LayerTreeContext.h&quot;
</del><span class="cx"> #include &lt;wtf/RunLoop.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-class DrawingAreaProxyImpl : public DrawingAreaProxy {
</del><ins>+class DrawingAreaProxyImpl final : public AcceleratedDrawingAreaProxy {
</ins><span class="cx"> public:
</span><span class="cx">     explicit DrawingAreaProxyImpl(WebPageProxy&amp;);
</span><span class="cx">     virtual ~DrawingAreaProxyImpl();
</span><span class="lines">@@ -44,74 +44,25 @@
</span><span class="cx"> 
</span><span class="cx">     void paint(BackingStore::PlatformGraphicsContext, const WebCore::IntRect&amp;, WebCore::Region&amp; unpaintedRegion);
</span><span class="cx"> 
</span><del>-    bool isInAcceleratedCompositingMode() const { return alwaysUseCompositing() || !m_layerTreeContext.isEmpty(); }
-
-    bool hasReceivedFirstUpdate() const { return m_hasReceivedFirstUpdate; }
-
-#if USE(TEXTURE_MAPPER) &amp;&amp; PLATFORM(GTK) &amp;&amp; !USE(REDIRECTED_XCOMPOSITE_WINDOW)
-    void setNativeSurfaceHandleForCompositing(uint64_t);
-    void destroyNativeSurfaceHandleForCompositing();
-#endif
-
-    void dispatchAfterEnsuringDrawing(std::function&lt;void (CallbackBase::Error)&gt;) override;
-
</del><span class="cx"> private:
</span><span class="cx">     // DrawingAreaProxy
</span><del>-    void sizeDidChange() override;
-    void deviceScaleFactorDidChange() override;
-
</del><span class="cx">     void setBackingStoreIsDiscardable(bool) override;
</span><del>-    void waitForBackingStoreUpdateOnNextPaint() override;
</del><span class="cx"> 
</span><span class="cx">     // IPC message handlers
</span><span class="cx">     void update(uint64_t backingStoreStateID, const UpdateInfo&amp;) override;
</span><span class="cx">     void didUpdateBackingStoreState(uint64_t backingStoreStateID, const UpdateInfo&amp;, const LayerTreeContext&amp;) override;
</span><del>-    void enterAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&amp;) override;
</del><span class="cx">     void exitAcceleratedCompositingMode(uint64_t backingStoreStateID, const UpdateInfo&amp;) override;
</span><del>-    void updateAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&amp;) override;
</del><span class="cx"> 
</span><span class="cx">     void incorporateUpdate(const UpdateInfo&amp;);
</span><span class="cx"> 
</span><del>-    enum RespondImmediatelyOrNot { DoNotRespondImmediately, RespondImmediately };
-    void backingStoreStateDidChange(RespondImmediatelyOrNot);
-    void sendUpdateBackingStoreState(RespondImmediatelyOrNot);
-    void waitForAndDispatchDidUpdateBackingStoreState();
</del><ins>+    void enterAcceleratedCompositingMode(const LayerTreeContext&amp;) override;
</ins><span class="cx"> 
</span><del>-    void enterAcceleratedCompositingMode(const LayerTreeContext&amp;);
-    void exitAcceleratedCompositingMode();
-    void updateAcceleratedCompositingMode(const LayerTreeContext&amp;);
-    bool alwaysUseCompositing() const;
-
</del><span class="cx">     void discardBackingStoreSoon();
</span><span class="cx">     void discardBackingStore();
</span><span class="cx"> 
</span><del>-    // The state ID corresponding to our current backing store. Updated whenever we allocate
-    // a new backing store. Any messages received that correspond to an earlier state are ignored,
-    // as they don't apply to our current backing store.
-    uint64_t m_currentBackingStoreStateID;
-
-    // The next backing store state ID we will request the web process update to. Incremented
-    // whenever our state changes in a way that will require a new backing store to be allocated.
-    uint64_t m_nextBackingStoreStateID;
-
-    // The current layer tree context.
-    LayerTreeContext m_layerTreeContext;
-
-    // Whether we've sent a UpdateBackingStoreState message and are now waiting for a DidUpdateBackingStoreState message.
-    // Used to throttle UpdateBackingStoreState messages so we don't send them faster than the Web process can handle.
-    bool m_isWaitingForDidUpdateBackingStoreState;
-    
-    // For a new Drawing Area don't draw anything until the WebProcess has sent over the first content.
-    bool m_hasReceivedFirstUpdate;
-
-    bool m_isBackingStoreDiscardable;
</del><ins>+    bool m_isBackingStoreDiscardable { true };
</ins><span class="cx">     std::unique_ptr&lt;BackingStore&gt; m_backingStore;
</span><del>-
</del><span class="cx">     RunLoop::Timer&lt;DrawingAreaProxyImpl&gt; m_discardBackingStoreTimer;
</span><del>-
-#if USE(TEXTURE_MAPPER) &amp;&amp; PLATFORM(GTK)
-    uint64_t m_pendingNativeSurfaceHandleForCompositing { 0 };
-#endif
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcesseflWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/efl/WebView.cpp (204248 => 204249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/efl/WebView.cpp        2016-08-08 02:48:56 UTC (rev 204248)
+++ trunk/Source/WebKit2/UIProcess/efl/WebView.cpp        2016-08-08 05:38:27 UTC (rev 204249)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if USE(COORDINATED_GRAPHICS)
</span><span class="cx"> #include &quot;APIPageConfiguration.h&quot;
</span><del>-#include &quot;CoordinatedDrawingAreaProxy.h&quot;
</del><ins>+#include &quot;AcceleratedDrawingAreaProxy.h&quot;
</ins><span class="cx"> #include &quot;CoordinatedGraphicsScene.h&quot;
</span><span class="cx"> #include &quot;CoordinatedLayerTreeHostProxy.h&quot;
</span><span class="cx"> #include &quot;DownloadManagerEfl.h&quot;
</span><span class="lines">@@ -210,7 +210,7 @@
</span><span class="cx">     m_visible = visible;
</span><span class="cx">     m_page-&gt;viewStateDidChange(ViewState::IsVisible);
</span><span class="cx"> 
</span><del>-    if (CoordinatedDrawingAreaProxy* drawingArea = static_cast&lt;CoordinatedDrawingAreaProxy*&gt;(page()-&gt;drawingArea()))
</del><ins>+    if (auto* drawingArea = static_cast&lt;AcceleratedDrawingAreaProxy*&gt;(page()-&gt;drawingArea()))
</ins><span class="cx">         drawingArea-&gt;visibilityDidChange();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -368,7 +368,7 @@
</span><span class="cx"> 
</span><span class="cx"> CoordinatedGraphicsScene* WebView::coordinatedGraphicsScene()
</span><span class="cx"> {
</span><del>-    if (CoordinatedDrawingAreaProxy* drawingArea = static_cast&lt;CoordinatedDrawingAreaProxy*&gt;(page()-&gt;drawingArea()))
</del><ins>+    if (auto* drawingArea = static_cast&lt;AcceleratedDrawingAreaProxy*&gt;(page()-&gt;drawingArea()))
</ins><span class="cx">         return drawingArea-&gt;coordinatedLayerTreeHostProxy().coordinatedGraphicsScene();
</span><span class="cx"> 
</span><span class="cx">     return nullptr;
</span><span class="lines">@@ -376,12 +376,12 @@
</span><span class="cx"> 
</span><span class="cx"> void WebView::updateViewportSize()
</span><span class="cx"> {
</span><del>-    if (CoordinatedDrawingAreaProxy* drawingArea = static_cast&lt;CoordinatedDrawingAreaProxy*&gt;(page()-&gt;drawingArea())) {
</del><ins>+    if (auto* drawingArea = static_cast&lt;AcceleratedDrawingAreaProxy*&gt;(page()-&gt;drawingArea())) {
</ins><span class="cx">         // Web Process expects sizes in UI units, and not raw device units.
</span><span class="cx">         drawingArea-&gt;setSize(roundedIntSize(dipSize()), IntSize(), IntSize());
</span><span class="cx">         FloatRect visibleContentsRect(contentPosition(), visibleContentsSize());
</span><span class="cx">         visibleContentsRect.intersect(FloatRect(FloatPoint(), contentsSize()));
</span><del>-        drawingArea-&gt;setVisibleContentsRect(visibleContentsRect, FloatPoint());
</del><ins>+        drawingArea-&gt;coordinatedLayerTreeHostProxy().setVisibleContentsRect(visibleContentsRect, FloatPoint());
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -406,7 +406,7 @@
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;DrawingAreaProxy&gt; WebView::createDrawingAreaProxy()
</span><span class="cx"> {
</span><del>-    return std::make_unique&lt;CoordinatedDrawingAreaProxy&gt;(*m_page);
</del><ins>+    return std::make_unique&lt;AcceleratedDrawingAreaProxy&gt;(*m_page);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebView::setViewNeedsDisplay(const WebCore::Region&amp; region)
</span></span></pre>
</div>
</div>

</body>
</html>