<!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>[217779] 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/217779">217779</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2017-06-05 05:01:53 -0700 (Mon, 05 Jun 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WPE] Use AcceleratedDrawingArea instead of its fork
https://bugs.webkit.org/show_bug.cgi?id=172496

Reviewed by Žan Doberšek.

WPE uses its own drawing area implementation, which is actually a fork of AcceleratedDrawingArea, but simplified
for the case of compositing being always forced. AcceleratedDrawingArea already handles the case of compositing
being forced, so now that WPE is upstream we could simply use AcceleratedDrawingArea instead.

* PlatformWPE.cmake:
* Shared/DrawingAreaInfo.h: Remove DrawingAreaTypeWPE type.
* UIProcess/API/wpe/DrawingAreaProxyWPE.cpp: Removed.
* UIProcess/API/wpe/DrawingAreaProxyWPE.h: Removed.
* UIProcess/API/wpe/PageClientImpl.cpp:
(WebKit::PageClientImpl::createDrawingAreaProxy): Create an AcceleratedDrawingAreaProxy.
* WebProcess/WebPage/AcceleratedDrawingArea.cpp:
(WebKit::AcceleratedDrawingArea::mainFrameContentSizeChanged): Moved from DrawingAreaImpl since it actually
belongs here.
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create): Create an AcceleratedDrawingArea for WPE port.
* WebProcess/WebPage/DrawingAreaImpl.cpp: Remove mainFrameContentSizeChanged() that doesn't belong here.
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/wpe/DrawingAreaWPE.cpp: Removed.
* WebProcess/WebPage/wpe/DrawingAreaWPE.h: Removed.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformWPEcmake">trunk/Source/WebKit2/PlatformWPE.cmake</a></li>
<li><a href="#trunkSourceWebKit2SharedCoordinatedGraphicsthreadedcompositorThreadedCompositorcpp">trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedDrawingAreaInfoh">trunk/Source/WebKit2/Shared/DrawingAreaInfo.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIwpePageClientImplcpp">trunk/Source/WebKit2/UIProcess/API/wpe/PageClientImpl.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageAcceleratedDrawingAreacpp">trunk/Source/WebKit2/WebProcess/WebPage/AcceleratedDrawingArea.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageDrawingAreacpp">trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageDrawingAreaImplcpp">trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageDrawingAreaImplh">trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPIwpeDrawingAreaProxyWPEcpp">trunk/Source/WebKit2/UIProcess/API/wpe/DrawingAreaProxyWPE.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIwpeDrawingAreaProxyWPEh">trunk/Source/WebKit2/UIProcess/API/wpe/DrawingAreaProxyWPE.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagewpeDrawingAreaWPEcpp">trunk/Source/WebKit2/WebProcess/WebPage/wpe/DrawingAreaWPE.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagewpeDrawingAreaWPEh">trunk/Source/WebKit2/WebProcess/WebPage/wpe/DrawingAreaWPE.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (217778 => 217779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog   2017-06-05 09:11:34 UTC (rev 217778)
+++ trunk/Source/WebKit2/ChangeLog      2017-06-05 12:01:53 UTC (rev 217779)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2017-06-05  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [WPE] Use AcceleratedDrawingArea instead of its fork
+        https://bugs.webkit.org/show_bug.cgi?id=172496
+
+        Reviewed by Žan Doberšek.
+
+        WPE uses its own drawing area implementation, which is actually a fork of AcceleratedDrawingArea, but simplified
+        for the case of compositing being always forced. AcceleratedDrawingArea already handles the case of compositing
+        being forced, so now that WPE is upstream we could simply use AcceleratedDrawingArea instead.
+
+        * PlatformWPE.cmake:
+        * Shared/DrawingAreaInfo.h: Remove DrawingAreaTypeWPE type.
+        * UIProcess/API/wpe/DrawingAreaProxyWPE.cpp: Removed.
+        * UIProcess/API/wpe/DrawingAreaProxyWPE.h: Removed.
+        * UIProcess/API/wpe/PageClientImpl.cpp:
+        (WebKit::PageClientImpl::createDrawingAreaProxy): Create an AcceleratedDrawingAreaProxy.
+        * WebProcess/WebPage/AcceleratedDrawingArea.cpp:
+        (WebKit::AcceleratedDrawingArea::mainFrameContentSizeChanged): Moved from DrawingAreaImpl since it actually
+        belongs here.
+        * WebProcess/WebPage/DrawingArea.cpp:
+        (WebKit::DrawingArea::create): Create an AcceleratedDrawingArea for WPE port.
+        * WebProcess/WebPage/DrawingAreaImpl.cpp: Remove mainFrameContentSizeChanged() that doesn't belong here.
+        * WebProcess/WebPage/DrawingAreaImpl.h:
+        * WebProcess/WebPage/wpe/DrawingAreaWPE.cpp: Removed.
+        * WebProcess/WebPage/wpe/DrawingAreaWPE.h: Removed.
+
</ins><span class="cx"> 2017-06-03  Simon Fraser  <simon.fraser@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Sort the project file.
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformWPEcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformWPE.cmake (217778 => 217779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformWPE.cmake   2017-06-05 09:11:34 UTC (rev 217778)
+++ trunk/Source/WebKit2/PlatformWPE.cmake      2017-06-05 12:01:53 UTC (rev 217779)
</span><span class="lines">@@ -90,6 +90,7 @@
</span><span class="cx">     Shared/wpe/ProcessExecutablePathWPE.cpp
</span><span class="cx">     Shared/wpe/WebEventFactory.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">@@ -105,7 +106,6 @@
</span><span class="cx">     UIProcess/API/C/wpe/WKView.cpp
</span><span class="cx"> 
</span><span class="cx">     UIProcess/API/wpe/CompositingManagerProxy.cpp
</span><del>-    UIProcess/API/wpe/DrawingAreaProxyWPE.cpp
</del><span class="cx">     UIProcess/API/wpe/PageClientImpl.cpp
</span><span class="cx">     UIProcess/API/wpe/ScrollGestureController.cpp
</span><span class="cx">     UIProcess/API/wpe/WPEView.cpp
</span><span class="lines">@@ -152,6 +152,7 @@
</span><span class="cx">     WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp
</span><span class="cx">     WebProcess/WebCoreSupport/wpe/WebPopupMenuWPE.cpp
</span><span class="cx"> 
</span><ins>+    WebProcess/WebPage/AcceleratedDrawingArea.cpp
</ins><span class="cx">     WebProcess/WebPage/AcceleratedSurface.cpp
</span><span class="cx"> 
</span><span class="cx">     WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.cpp
</span><span class="lines">@@ -164,7 +165,6 @@
</span><span class="cx"> 
</span><span class="cx">     WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp
</span><span class="cx">     WebProcess/WebPage/wpe/CompositingManager.cpp
</span><del>-    WebProcess/WebPage/wpe/DrawingAreaWPE.cpp
</del><span class="cx">     WebProcess/WebPage/wpe/WebInspectorUIWPE.cpp
</span><span class="cx">     WebProcess/WebPage/wpe/WebPageWPE.cpp
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedCoordinatedGraphicsthreadedcompositorThreadedCompositorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp (217778 => 217779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp        2017-06-05 09:11:34 UTC (rev 217778)
+++ trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp   2017-06-05 12:01:53 UTC (rev 217779)
</span><span class="lines">@@ -182,10 +182,14 @@
</span><span class="cx"> 
</span><span class="cx"> void ThreadedCompositor::forceRepaint()
</span><span class="cx"> {
</span><ins>+    // FIXME: Enable this for WPE once it's possible to do these forced updates
+    // in a way that doesn't starve out the underlying graphics buffers.
+#if PLATFORM(GTK)
</ins><span class="cx">     m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this)] {
</span><span class="cx">         SetForScope<bool> change(m_inForceRepaint, true);
</span><span class="cx">         renderLayerTree();
</span><span class="cx">     });
</span><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ThreadedCompositor::renderLayerTree()
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedDrawingAreaInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/DrawingAreaInfo.h (217778 => 217779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/DrawingAreaInfo.h    2017-06-05 09:11:34 UTC (rev 217778)
+++ trunk/Source/WebKit2/Shared/DrawingAreaInfo.h       2017-06-05 12:01:53 UTC (rev 217779)
</span><span class="lines">@@ -34,8 +34,6 @@
</span><span class="cx">     DrawingAreaTypeTiledCoreAnimation,
</span><span class="cx"> #endif
</span><span class="cx">     DrawingAreaTypeRemoteLayerTree,
</span><del>-#elif PLATFORM(WPE)
-    DrawingAreaTypeWPE
</del><span class="cx"> #else
</span><span class="cx">     DrawingAreaTypeImpl
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIwpeDrawingAreaProxyWPEcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/wpe/DrawingAreaProxyWPE.cpp (217778 => 217779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/wpe/DrawingAreaProxyWPE.cpp   2017-06-05 09:11:34 UTC (rev 217778)
+++ trunk/Source/WebKit2/UIProcess/API/wpe/DrawingAreaProxyWPE.cpp      2017-06-05 12:01:53 UTC (rev 217779)
</span><span class="lines">@@ -1,97 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 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 "config.h"
-#include "DrawingAreaProxyWPE.h"
-
-#include "DrawingAreaMessages.h"
-#include "WebPageProxy.h"
-#include "WebProcessProxy.h"
-#include <WebCore/NotImplemented.h>
-
-namespace WebKit {
-
-DrawingAreaProxyWPE::DrawingAreaProxyWPE(WebPageProxy& page)
-    : DrawingAreaProxy(DrawingAreaTypeWPE, page)
-{
-}
-
-DrawingAreaProxyWPE::~DrawingAreaProxyWPE()
-{
-}
-
-void DrawingAreaProxyWPE::deviceScaleFactorDidChange()
-{
-    notImplemented();
-}
-
-void DrawingAreaProxyWPE::sizeDidChange()
-{
-    if (m_webPageProxy.isValid())
-        m_webPageProxy.process().send(Messages::DrawingArea::UpdateBackingStoreState(0, false, m_webPageProxy.deviceScaleFactor(), m_size, m_scrollOffset), m_webPageProxy.pageID());
-}
-
-void DrawingAreaProxyWPE::dispatchAfterEnsuringDrawing(std::function<void(CallbackBase::Error)> callbackFunction)
-{
-    if (!m_webPageProxy.isValid()) {
-        callbackFunction(CallbackBase::Error::OwnerWasInvalidated);
-        return;
-    }
-
-    RunLoop::main().dispatch(
-        [callbackFunction] {
-            callbackFunction(CallbackBase::Error::None);
-        });
-}
-
-void DrawingAreaProxyWPE::update(uint64_t backingStoreStateID, const UpdateInfo&)
-{
-    notImplemented();
-}
-
-void DrawingAreaProxyWPE::didUpdateBackingStoreState(uint64_t backingStoreStateID, const UpdateInfo&, const LayerTreeContext&)
-{
-    notImplemented();
-}
-
-void DrawingAreaProxyWPE::enterAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext& layerTreeContext)
-{
-    ASSERT(!backingStoreStateID);
-
-    m_layerTreeContext = layerTreeContext;
-    m_webPageProxy.enterAcceleratedCompositingMode(layerTreeContext);
-}
-
-void DrawingAreaProxyWPE::exitAcceleratedCompositingMode(uint64_t backingStoreStateID, const UpdateInfo&)
-{
-    notImplemented();
-}
-
-void DrawingAreaProxyWPE::updateAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&)
-{
-    notImplemented();
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIwpeDrawingAreaProxyWPEh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/wpe/DrawingAreaProxyWPE.h (217778 => 217779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/wpe/DrawingAreaProxyWPE.h     2017-06-05 09:11:34 UTC (rev 217778)
+++ trunk/Source/WebKit2/UIProcess/API/wpe/DrawingAreaProxyWPE.h        2017-06-05 12:01:53 UTC (rev 217779)
</span><span class="lines">@@ -1,56 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 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 "DrawingAreaProxy.h"
-
-#include "LayerTreeContext.h"
-
-namespace WebKit {
-
-class DrawingAreaProxyWPE final : public DrawingAreaProxy {
-public:
-    explicit DrawingAreaProxyWPE(WebPageProxy&);
-    virtual ~DrawingAreaProxyWPE();
-
-private:
-    // DrawingAreaProxy
-    void deviceScaleFactorDidChange() override;
-    void sizeDidChange() override;
-    void dispatchAfterEnsuringDrawing(std::function<void(CallbackBase::Error)>) override;
-
-    // IPC message handlers
-    void update(uint64_t backingStoreStateID, const UpdateInfo&) override;
-    void didUpdateBackingStoreState(uint64_t backingStoreStateID, const UpdateInfo&, const LayerTreeContext&) override;
-    void enterAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&) override;
-    void exitAcceleratedCompositingMode(uint64_t backingStoreStateID, const UpdateInfo&) override;
-    void updateAcceleratedCompositingMode(uint64_t backingStoreStateID, const LayerTreeContext&) override;
-
-    // The current layer tree context.
-    LayerTreeContext m_layerTreeContext;
-};
-
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIwpePageClientImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/wpe/PageClientImpl.cpp (217778 => 217779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/wpe/PageClientImpl.cpp        2017-06-05 09:11:34 UTC (rev 217778)
+++ trunk/Source/WebKit2/UIProcess/API/wpe/PageClientImpl.cpp   2017-06-05 12:01:53 UTC (rev 217779)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "PageClientImpl.h"
</span><span class="cx"> 
</span><del>-#include "DrawingAreaProxyWPE.h"
</del><ins>+#include "AcceleratedDrawingAreaProxy.h"
</ins><span class="cx"> #include "NativeWebMouseEvent.h"
</span><span class="cx"> #include "NativeWebWheelEvent.h"
</span><span class="cx"> #include "ScrollGestureController.h"
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr<DrawingAreaProxy> PageClientImpl::createDrawingAreaProxy()
</span><span class="cx"> {
</span><del>-    return std::make_unique<DrawingAreaProxyWPE>(m_view.page());
</del><ins>+    return std::make_unique<AcceleratedDrawingAreaProxy>(m_view.page());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PageClientImpl::setViewNeedsDisplay(const WebCore::Region&)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageAcceleratedDrawingAreacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/AcceleratedDrawingArea.cpp (217778 => 217779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/AcceleratedDrawingArea.cpp       2017-06-05 09:11:34 UTC (rev 217778)
+++ trunk/Source/WebKit2/WebProcess/WebPage/AcceleratedDrawingArea.cpp  2017-06-05 12:01:53 UTC (rev 217779)
</span><span class="lines">@@ -162,6 +162,11 @@
</span><span class="cx">             m_layerTreeHost->sizeDidChange(size);
</span><span class="cx">         else if (m_previousLayerTreeHost)
</span><span class="cx">             m_previousLayerTreeHost->sizeDidChange(size);
</span><ins>+    } else {
+        if (m_layerTreeHost)
+            m_layerTreeHost->contentsSizeChanged(size);
+        else if (m_previousLayerTreeHost)
+            m_previousLayerTreeHost->contentsSizeChanged(size);
</ins><span class="cx">     }
</span><span class="cx">     m_webPage.mainFrame()->pageOverlayController().didChangeDocumentSize();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageDrawingAreacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp (217778 => 217779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp  2017-06-05 09:11:34 UTC (rev 217778)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp     2017-06-05 12:01:53 UTC (rev 217779)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> #include "RemoteLayerTreeDrawingArea.h"
</span><span class="cx"> #include "TiledCoreAnimationDrawingArea.h"
</span><span class="cx"> #elif PLATFORM(WPE)
</span><del>-#include "DrawingAreaWPE.h"
</del><ins>+#include "AcceleratedDrawingArea.h"
</ins><span class="cx"> #else
</span><span class="cx"> #include "DrawingAreaImpl.h"
</span><span class="cx"> #endif
</span><span class="lines">@@ -57,13 +57,14 @@
</span><span class="cx"> #endif
</span><span class="cx">     case DrawingAreaTypeRemoteLayerTree:
</span><span class="cx">         return std::make_unique<RemoteLayerTreeDrawingArea>(webPage, parameters);
</span><del>-#elif PLATFORM(WPE)
-    case DrawingAreaTypeWPE:
-        return std::make_unique<DrawingAreaWPE>(webPage, parameters);
</del><span class="cx"> #else
</span><span class="cx">     case DrawingAreaTypeImpl:
</span><ins>+#if PLATFORM(WPE)
+        return std::make_unique<AcceleratedDrawingArea>(webPage, parameters);
+#else
</ins><span class="cx">         return std::make_unique<DrawingAreaImpl>(webPage, parameters);
</span><span class="cx"> #endif
</span><ins>+#endif
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return nullptr;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageDrawingAreaImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp (217778 => 217779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp      2017-06-05 09:11:34 UTC (rev 217778)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp 2017-06-05 12:01:53 UTC (rev 217779)
</span><span class="lines">@@ -169,18 +169,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void DrawingAreaImpl::mainFrameContentSizeChanged(const WebCore::IntSize& newSize)
-{
-#if USE(COORDINATED_GRAPHICS_THREADED)
-    if (m_layerTreeHost)
-        m_layerTreeHost->contentsSizeChanged(newSize);
-    else if (m_previousLayerTreeHost)
-        m_previousLayerTreeHost->contentsSizeChanged(newSize);
-#else
-    UNUSED_PARAM(newSize);
-#endif
-}
-
</del><span class="cx"> void DrawingAreaImpl::updatePreferences(const WebPreferencesStore& store)
</span><span class="cx"> {
</span><span class="cx">     Settings& settings = m_webPage.corePage()->settings();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageDrawingAreaImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h (217778 => 217779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h        2017-06-05 09:11:34 UTC (rev 217778)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h   2017-06-05 12:01:53 UTC (rev 217779)
</span><span class="lines">@@ -49,7 +49,6 @@
</span><span class="cx">     void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollDelta) override;
</span><span class="cx">     void forceRepaint() override;
</span><span class="cx"> 
</span><del>-    void mainFrameContentSizeChanged(const WebCore::IntSize&) override;
</del><span class="cx">     void updatePreferences(const WebPreferencesStore&) override;
</span><span class="cx"> 
</span><span class="cx">     void setRootCompositingLayer(WebCore::GraphicsLayer*) override;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagewpeDrawingAreaWPEcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/WebProcess/WebPage/wpe/DrawingAreaWPE.cpp (217778 => 217779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/wpe/DrawingAreaWPE.cpp   2017-06-05 09:11:34 UTC (rev 217778)
+++ trunk/Source/WebKit2/WebProcess/WebPage/wpe/DrawingAreaWPE.cpp      2017-06-05 12:01:53 UTC (rev 217779)
</span><span class="lines">@@ -1,202 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 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 "config.h"
-#include "DrawingAreaWPE.h"
-
-#include "DrawingAreaProxyMessages.h"
-#include "WebPage.h"
-#include "WebPreferencesKeys.h"
-#include "WebPreferencesStore.h"
-#include <WebCore/DisplayRefreshMonitor.h>
-#include <WebCore/MainFrame.h>
-#include <WebCore/NotImplemented.h>
-#include <WebCore/Settings.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-DrawingAreaWPE::DrawingAreaWPE(WebPage& webPage, const WebPageCreationParameters&)
-    : DrawingArea(DrawingAreaTypeWPE, webPage)
-{
-    webPage.corePage()->settings().setForceCompositingMode(true);
-    enterAcceleratedCompositingMode(0);
-}
-
-DrawingAreaWPE::~DrawingAreaWPE()
-{
-    ASSERT(m_layerTreeHost);
-    m_layerTreeHost->invalidate();
-}
-
-void DrawingAreaWPE::layerHostDidFlushLayers()
-{
-    m_webPage.send(Messages::DrawingAreaProxy::EnterAcceleratedCompositingMode(0, m_layerTreeHost->layerTreeContext()));
-}
-
-void DrawingAreaWPE::setNeedsDisplay()
-{
-    ASSERT(m_layerTreeHost);
-    m_layerTreeHost->setNonCompositedContentsNeedDisplay();
-}
-
-void DrawingAreaWPE::setNeedsDisplayInRect(const IntRect& rect)
-{
-    ASSERT(m_layerTreeHost);
-    m_layerTreeHost->setNonCompositedContentsNeedDisplayInRect(rect);
-}
-
-void DrawingAreaWPE::scroll(const IntRect& scrollRect, const IntSize&)
-{
-    ASSERT(m_layerTreeHost);
-    m_layerTreeHost->scrollNonCompositedContents(scrollRect);
-}
-
-void DrawingAreaWPE::pageBackgroundTransparencyChanged()
-{
-    if (m_layerTreeHost)
-        m_layerTreeHost->pageBackgroundTransparencyChanged();
-}
-
-void DrawingAreaWPE::forceRepaint()
-{
-    notImplemented();
-}
-
-bool DrawingAreaWPE::forceRepaintAsync(uint64_t callbackID)
-{
-    return m_layerTreeHost && m_layerTreeHost->forceRepaintAsync(callbackID);
-}
-
-void DrawingAreaWPE::setLayerTreeStateIsFrozen(bool frozen)
-{
-    m_layerTreeStateIsFrozen = frozen;
-}
-
-void DrawingAreaWPE::setPaintingEnabled(bool)
-{
-    notImplemented();
-}
-
-void DrawingAreaWPE::updatePreferences(const WebPreferencesStore& store)
-{
-    m_webPage.corePage()->settings().setForceCompositingMode(store.getBoolValueForKey(WebPreferencesKey::forceCompositingModeKey()));
-}
-
-void DrawingAreaWPE::mainFrameContentSizeChanged(const WebCore::IntSize& size)
-{
-    if (m_layerTreeHost)
-        m_layerTreeHost->contentsSizeChanged(size);
-}
-
-GraphicsLayerFactory* DrawingAreaWPE::graphicsLayerFactory()
-{
-    if (m_layerTreeHost)
-        return m_layerTreeHost->graphicsLayerFactory();
-    return nullptr;
-}
-
-void DrawingAreaWPE::setRootCompositingLayer(GraphicsLayer* graphicsLayer)
-{
-    ASSERT(m_layerTreeHost);
-    m_layerTreeHost->setRootCompositingLayer(graphicsLayer);
-}
-
-void DrawingAreaWPE::scheduleCompositingLayerFlush()
-{
-    if (m_layerTreeHost)
-        m_layerTreeHost->scheduleLayerFlush();
-}
-
-void DrawingAreaWPE::scheduleCompositingLayerFlushImmediately()
-{
-    scheduleCompositingLayerFlush();
-}
-
-#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
-RefPtr<WebCore::DisplayRefreshMonitor> DrawingAreaWPE::createDisplayRefreshMonitor(PlatformDisplayID displayID)
-{
-    if (m_layerTreeHost)
-        return m_layerTreeHost->createDisplayRefreshMonitor(displayID);
-
-    return nullptr;
-}
-#endif
-
-void DrawingAreaWPE::attachViewOverlayGraphicsLayer(WebCore::Frame* frame, WebCore::GraphicsLayer* viewOverlayRootLayer)
-{
-    if (!frame->isMainFrame())
-        return;
-
-    ASSERT(m_layerTreeHost);
-    m_layerTreeHost->setViewOverlayRootLayer(viewOverlayRootLayer);
-}
-
-#if USE(COORDINATED_GRAPHICS_THREADED)
-void DrawingAreaWPE::didChangeViewportAttributes(WebCore::ViewportAttributes&&)
-{
-}
-#endif
-
-#if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
-void DrawingAreaWPE::deviceOrPageScaleFactorChanged()
-{
-}
-#endif
-
-void DrawingAreaWPE::updateBackingStoreState(uint64_t, bool, float deviceScaleFactor, const WebCore::IntSize& size, const WebCore::IntSize& scrollOffset)
-{
-    m_webPage.setDeviceScaleFactor(deviceScaleFactor);
-    m_webPage.setSize(size);
-    m_webPage.layoutIfNeeded();
-    m_webPage.scrollMainFrameIfNotAtMaxScrollPosition(scrollOffset);
-
-    ASSERT(m_layerTreeHost);
-    m_layerTreeHost->sizeDidChange(m_webPage.size());
-}
-
-void DrawingAreaWPE::didUpdate()
-{
-}
-
-void DrawingAreaWPE::enterAcceleratedCompositingMode(GraphicsLayer* graphicsLayer)
-{
-    ASSERT(!m_layerTreeHost);
-    m_layerTreeHost = LayerTreeHost::create(m_webPage);
-    m_layerTreeHost->setRootCompositingLayer(graphicsLayer);
-    m_layerTreeHost->setShouldNotifyAfterNextScheduledLayerFlush(true);
-    m_layerTreeHost->sizeDidChange(m_webPage.size());
-}
-
-#if USE(COORDINATED_GRAPHICS)
-void DrawingAreaWPE::resetUpdateAtlasForTesting()
-{
-    ASSERT(m_layerTreeHost);
-    m_layerTreeHost->clearUpdateAtlases();
-}
-#endif
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagewpeDrawingAreaWPEh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/WebProcess/WebPage/wpe/DrawingAreaWPE.h (217778 => 217779)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/wpe/DrawingAreaWPE.h     2017-06-05 09:11:34 UTC (rev 217778)
+++ trunk/Source/WebKit2/WebProcess/WebPage/wpe/DrawingAreaWPE.h        2017-06-05 12:01:53 UTC (rev 217779)
</span><span class="lines">@@ -1,91 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 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 "DrawingArea.h"
-
-#include "LayerTreeHost.h"
-
-namespace WebKit {
-
-class DrawingAreaWPE : public DrawingArea {
-public:
-    DrawingAreaWPE(WebPage&, const WebPageCreationParameters&);
-    virtual ~DrawingAreaWPE();
-
-    void layerHostDidFlushLayers() override;
-
-private:
-    // DrawingArea
-    void setNeedsDisplay() override;
-    void setNeedsDisplayInRect(const WebCore::IntRect&) override;
-    void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollDelta) override;
-
-    void pageBackgroundTransparencyChanged() override;
-    void forceRepaint() override;
-    bool forceRepaintAsync(uint64_t callbackID) override;
-    void setLayerTreeStateIsFrozen(bool) override;
-    bool layerTreeStateIsFrozen() const override { return m_layerTreeStateIsFrozen; }
-    LayerTreeHost* layerTreeHost() const override { return m_layerTreeHost.get(); }
-
-    void setPaintingEnabled(bool) override;
-    void updatePreferences(const WebPreferencesStore&) override;
-    void mainFrameContentSizeChanged(const WebCore::IntSize&) override;
-
-    WebCore::GraphicsLayerFactory* graphicsLayerFactory() override;
-    void setRootCompositingLayer(WebCore::GraphicsLayer*) override;
-    void scheduleCompositingLayerFlush() override;
-    void scheduleCompositingLayerFlushImmediately() override;
-
-#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
-    RefPtr<WebCore::DisplayRefreshMonitor> createDisplayRefreshMonitor(WebCore::PlatformDisplayID) override;
-#endif
-
-    void attachViewOverlayGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) override;
-
-#if USE(COORDINATED_GRAPHICS_THREADED)
-    void didChangeViewportAttributes(WebCore::ViewportAttributes&&) override;
-#endif
-
-#if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
-    void deviceOrPageScaleFactorChanged() override;
-    void resetUpdateAtlasForTesting() override;
-#endif
-
-    void updateBackingStoreState(uint64_t, bool, float, const WebCore::IntSize&, const WebCore::IntSize&) override;
-    void didUpdate() override;
-
-    void enterAcceleratedCompositingMode(WebCore::GraphicsLayer*);
-
-    // When true, we maintain the layer tree in its current state by not leaving accelerated compositing mode
-    // and not scheduling layer flushes.
-    bool m_layerTreeStateIsFrozen { false };
-
-    // The layer tree host that handles accelerated compositing.
-    RefPtr<LayerTreeHost> m_layerTreeHost;
-};
-
-} // namespace WebKit
</del></span></pre>
</div>
</div>

</body>
</html>