[WPE] Use AcceleratedDrawingArea instead of its fork
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Jun 2017 12:01:53 +0000 (12:01 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Jun 2017 12:01:53 +0000 (12:01 +0000)
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.

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

13 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformWPE.cmake
Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp
Source/WebKit2/Shared/DrawingAreaInfo.h
Source/WebKit2/UIProcess/API/wpe/DrawingAreaProxyWPE.cpp [deleted file]
Source/WebKit2/UIProcess/API/wpe/DrawingAreaProxyWPE.h [deleted file]
Source/WebKit2/UIProcess/API/wpe/PageClientImpl.cpp
Source/WebKit2/WebProcess/WebPage/AcceleratedDrawingArea.cpp
Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp
Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h
Source/WebKit2/WebProcess/WebPage/wpe/DrawingAreaWPE.cpp [deleted file]
Source/WebKit2/WebProcess/WebPage/wpe/DrawingAreaWPE.h [deleted file]

index 5209f18..de18e78 100644 (file)
@@ -1,3 +1,30 @@
+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.
+
 2017-06-03  Simon Fraser  <simon.fraser@apple.com>
 
         Sort the project file.
index e60db1a..f53353c 100644 (file)
@@ -90,6 +90,7 @@ list(APPEND WebKit2_SOURCES
     Shared/wpe/ProcessExecutablePathWPE.cpp
     Shared/wpe/WebEventFactory.cpp
 
+    UIProcess/AcceleratedDrawingAreaProxy.cpp
     UIProcess/BackingStore.cpp
     UIProcess/DefaultUndoController.cpp
     UIProcess/LegacySessionStateCodingNone.cpp
@@ -105,7 +106,6 @@ list(APPEND WebKit2_SOURCES
     UIProcess/API/C/wpe/WKView.cpp
 
     UIProcess/API/wpe/CompositingManagerProxy.cpp
-    UIProcess/API/wpe/DrawingAreaProxyWPE.cpp
     UIProcess/API/wpe/PageClientImpl.cpp
     UIProcess/API/wpe/ScrollGestureController.cpp
     UIProcess/API/wpe/WPEView.cpp
@@ -152,6 +152,7 @@ list(APPEND WebKit2_SOURCES
     WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp
     WebProcess/WebCoreSupport/wpe/WebPopupMenuWPE.cpp
 
+    WebProcess/WebPage/AcceleratedDrawingArea.cpp
     WebProcess/WebPage/AcceleratedSurface.cpp
 
     WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.cpp
@@ -164,7 +165,6 @@ list(APPEND WebKit2_SOURCES
 
     WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp
     WebProcess/WebPage/wpe/CompositingManager.cpp
-    WebProcess/WebPage/wpe/DrawingAreaWPE.cpp
     WebProcess/WebPage/wpe/WebInspectorUIWPE.cpp
     WebProcess/WebPage/wpe/WebPageWPE.cpp
 
index 4f49ab7..29f0f60 100644 (file)
@@ -182,10 +182,14 @@ void ThreadedCompositor::updateViewport()
 
 void ThreadedCompositor::forceRepaint()
 {
+    // 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)
     m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this)] {
         SetForScope<bool> change(m_inForceRepaint, true);
         renderLayerTree();
     });
+#endif
 }
 
 void ThreadedCompositor::renderLayerTree()
index a435e19..7fc4d7c 100644 (file)
@@ -34,8 +34,6 @@ enum DrawingAreaType {
     DrawingAreaTypeTiledCoreAnimation,
 #endif
     DrawingAreaTypeRemoteLayerTree,
-#elif PLATFORM(WPE)
-    DrawingAreaTypeWPE
 #else
     DrawingAreaTypeImpl
 #endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/DrawingAreaProxyWPE.cpp b/Source/WebKit2/UIProcess/API/wpe/DrawingAreaProxyWPE.cpp
deleted file mode 100644 (file)
index 373c0f6..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * 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
diff --git a/Source/WebKit2/UIProcess/API/wpe/DrawingAreaProxyWPE.h b/Source/WebKit2/UIProcess/API/wpe/DrawingAreaProxyWPE.h
deleted file mode 100644 (file)
index 1f427b4..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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;
-};
-
-}
index 1f70e36..b102dee 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "PageClientImpl.h"
 
-#include "DrawingAreaProxyWPE.h"
+#include "AcceleratedDrawingAreaProxy.h"
 #include "NativeWebMouseEvent.h"
 #include "NativeWebWheelEvent.h"
 #include "ScrollGestureController.h"
@@ -47,7 +47,7 @@ PageClientImpl::~PageClientImpl() = default;
 
 std::unique_ptr<DrawingAreaProxy> PageClientImpl::createDrawingAreaProxy()
 {
-    return std::make_unique<DrawingAreaProxyWPE>(m_view.page());
+    return std::make_unique<AcceleratedDrawingAreaProxy>(m_view.page());
 }
 
 void PageClientImpl::setViewNeedsDisplay(const WebCore::Region&)
index b963ad8..4d07e2e 100644 (file)
@@ -162,6 +162,11 @@ void AcceleratedDrawingArea::mainFrameContentSizeChanged(const IntSize& size)
             m_layerTreeHost->sizeDidChange(size);
         else if (m_previousLayerTreeHost)
             m_previousLayerTreeHost->sizeDidChange(size);
+    } else {
+        if (m_layerTreeHost)
+            m_layerTreeHost->contentsSizeChanged(size);
+        else if (m_previousLayerTreeHost)
+            m_previousLayerTreeHost->contentsSizeChanged(size);
     }
     m_webPage.mainFrame()->pageOverlayController().didChangeDocumentSize();
 }
index 5f093ac..5ad5b4b 100644 (file)
@@ -38,7 +38,7 @@
 #include "RemoteLayerTreeDrawingArea.h"
 #include "TiledCoreAnimationDrawingArea.h"
 #elif PLATFORM(WPE)
-#include "DrawingAreaWPE.h"
+#include "AcceleratedDrawingArea.h"
 #else
 #include "DrawingAreaImpl.h"
 #endif
@@ -57,13 +57,14 @@ std::unique_ptr<DrawingArea> DrawingArea::create(WebPage& webPage, const WebPage
 #endif
     case DrawingAreaTypeRemoteLayerTree:
         return std::make_unique<RemoteLayerTreeDrawingArea>(webPage, parameters);
-#elif PLATFORM(WPE)
-    case DrawingAreaTypeWPE:
-        return std::make_unique<DrawingAreaWPE>(webPage, parameters);
 #else
     case DrawingAreaTypeImpl:
+#if PLATFORM(WPE)
+        return std::make_unique<AcceleratedDrawingArea>(webPage, parameters);
+#else
         return std::make_unique<DrawingAreaImpl>(webPage, parameters);
 #endif
+#endif
     }
 
     return nullptr;
index 3691277..0315228 100644 (file)
@@ -169,18 +169,6 @@ void DrawingAreaImpl::forceRepaint()
     }
 }
 
-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
-}
-
 void DrawingAreaImpl::updatePreferences(const WebPreferencesStore& store)
 {
     Settings& settings = m_webPage.corePage()->settings();
index 3fce0a7..57c2914 100644 (file)
@@ -49,7 +49,6 @@ private:
     void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollDelta) override;
     void forceRepaint() override;
 
-    void mainFrameContentSizeChanged(const WebCore::IntSize&) override;
     void updatePreferences(const WebPreferencesStore&) override;
 
     void setRootCompositingLayer(WebCore::GraphicsLayer*) override;
diff --git a/Source/WebKit2/WebProcess/WebPage/wpe/DrawingAreaWPE.cpp b/Source/WebKit2/WebProcess/WebPage/wpe/DrawingAreaWPE.cpp
deleted file mode 100644 (file)
index 915f9ff..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * 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
diff --git a/Source/WebKit2/WebProcess/WebPage/wpe/DrawingAreaWPE.h b/Source/WebKit2/WebProcess/WebPage/wpe/DrawingAreaWPE.h
deleted file mode 100644 (file)
index 9ad2d3b..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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