Title: [124989] trunk
Revision
124989
Author
commit-qu...@webkit.org
Date
2012-08-07 22:38:28 -0700 (Tue, 07 Aug 2012)

Log Message

[WK2][EFL] Implement accelerated compositing on WK2 Efl port
https://bugs.webkit.org/show_bug.cgi?id=89840

Patch by YoungTaeck Song <youngtaeck.s...@samsung.com> on 2012-08-07
Reviewed by Noam Rosenthal.

.:

Implement accelerated composition with TiledBackingStore on WK2 Efl port.
This implementation is based on COORDINATED_GRAPHICS.
Add COORDINATED_GRAPHICS related definitions in OptionsEfl.cmake.

* Source/cmake/OptionsEfl.cmake:

Source/WebKit2:

Implement accelerated composition with TiledBackingStore on WK2 Efl port.
This implementation is based on COORDINATED_GRAPHICS.

* CMakeLists.txt:
* PlatformEfl.cmake:
* Shared/ShareableSurface.cpp:
* Shared/WebCoreArgumentCoders.cpp:
* Shared/WebCoreArgumentCoders.h:
* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::didChangeContentsSize):
(WebKit):
* UIProcess/API/efl/PageClientImpl.h:
(PageClientImpl):
* UIProcess/API/efl/ViewportProcessor.cpp: Added.
(WebKit):
(WebKit::ViewportProcessor::ViewportProcessor):
(WebKit::ViewportProcessor::~ViewportProcessor):
(WebKit::ViewportProcessor::display):
(WebKit::ViewportProcessor::updateViewportSize):
(WebKit::ViewportProcessor::setVisibleContentsRect):
(WebKit::ViewportProcessor::didChangeContentsSize):
* UIProcess/API/efl/ViewportProcessor.h: Added.
(WebKit):
(ViewportProcessor):
(WebKit::ViewportProcessor::create):
(WebKit::ViewportProcessor::drawingArea):
(WebKit::ViewportProcessor::viewSize):
* UIProcess/API/efl/ewk_view.cpp:
(_Ewk_View_Private_Data):
(_ewk_view_smart_calculate):
(ewk_view_base_add):
(ewk_view_display):
(ewk_view_contents_size_changed):
* UIProcess/API/efl/ewk_view_private.h:
* UIProcess/PageClient.h:
(PageClient):
* UIProcess/WebPageProxy.cpp:
(WebKit):
(WebKit::WebPageProxy::didChangeContentsSize):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp:
* WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h:
* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::create):
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit):
* WebProcess/efl/WebProcessMainEfl.cpp:
(WebKit::WebProcessMainEfl):

Tools:

Implement accelerated composition with TiledBackingStore on WK2 Efl port.
Add OPENGL_LIBRARIES in CMakeList.txt.

* MiniBrowser/efl/CMakeLists.txt:
* WebKitTestRunner/PlatformEfl.cmake:

Modified Paths

Added Paths

Diff

Modified: trunk/ChangeLog (124988 => 124989)


--- trunk/ChangeLog	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/ChangeLog	2012-08-08 05:38:28 UTC (rev 124989)
@@ -1,3 +1,16 @@
+2012-08-07  YoungTaeck Song  <youngtaeck.s...@samsung.com>
+
+        [WK2][EFL] Implement accelerated compositing on WK2 Efl port
+        https://bugs.webkit.org/show_bug.cgi?id=89840
+
+        Reviewed by Noam Rosenthal.
+
+        Implement accelerated composition with TiledBackingStore on WK2 Efl port.
+        This implementation is based on COORDINATED_GRAPHICS.
+        Add COORDINATED_GRAPHICS related definitions in OptionsEfl.cmake.
+
+        * Source/cmake/OptionsEfl.cmake:
+
 2012-08-07  No'am Rosenthal  <noam.rosent...@nokia.com>
 
         [Qt] Make it possible to build without QtQuick

Modified: trunk/Source/WebKit2/CMakeLists.txt (124988 => 124989)


--- trunk/Source/WebKit2/CMakeLists.txt	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/CMakeLists.txt	2012-08-08 05:38:28 UTC (rev 124989)
@@ -15,6 +15,7 @@
     "${WEBKIT2_DIR}/UIProcess/API/C"
     "${WEBKIT2_DIR}/UIProcess/API/cpp"
     "${WEBKIT2_DIR}/UIProcess/Authentication"
+    "${WEBKIT2_DIR}/UIProcess/CoordinatedGraphics"
     "${WEBKIT2_DIR}/UIProcess/Downloads"
     "${WEBKIT2_DIR}/UIProcess/Launcher"
     "${WEBKIT2_DIR}/UIProcess/Notifications"
@@ -42,6 +43,7 @@
     "${WEBKIT2_DIR}/WebProcess/Plugins/Netscape"
     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport"
     "${WEBKIT2_DIR}/WebProcess/WebPage"
+    "${WEBKIT2_DIR}/WebProcess/WebPage/CoordinatedGraphics"
     "${WEBCORE_DIR}"
     "${WEBCORE_DIR}/Modules/battery"
     "${WEBCORE_DIR}/Modules/intents"
@@ -71,6 +73,8 @@
     "${WEBCORE_DIR}/platform/graphics/filters"
     "${WEBCORE_DIR}/platform/graphics/harfbuzz"
     "${WEBCORE_DIR}/platform/graphics/harfbuzz/ng"
+    "${WEBCORE_DIR}/platform/graphics/surfaces"
+    "${WEBCORE_DIR}/platform/graphics/texmap"
     "${WEBCORE_DIR}/platform/graphics/transforms"
     "${WEBCORE_DIR}/platform/network"
     "${WEBCORE_DIR}/platform/sql"
@@ -141,7 +145,9 @@
     Shared/SecurityOriginData.cpp
     Shared/SessionState.cpp
     Shared/ShareableBitmap.cpp
+    Shared/ShareableSurface.cpp
     Shared/StatisticsData.cpp
+    Shared/SurfaceUpdateInfo.cpp
     Shared/UpdateInfo.cpp
     Shared/VisitedLinkTable.cpp
     Shared/WebBackForwardListItem.cpp
@@ -323,6 +329,7 @@
     UIProcess/Authentication/WebCredential.cpp
     UIProcess/Authentication/WebProtectionSpace.cpp
 
+    UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp
     UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp
     UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp
     
@@ -461,6 +468,7 @@
     WebProcess/WebPage/LayerTreeHost.cpp
     WebProcess/WebPage/PageOverlay.cpp
     WebProcess/WebPage/TapHighlightController.cpp
+    WebProcess/WebPage/UpdateAtlas.cpp
     WebProcess/WebPage/WebBackForwardListProxy.cpp
     WebProcess/WebPage/WebContextMenu.cpp
     WebProcess/WebPage/WebFrame.cpp
@@ -472,6 +480,7 @@
 
     WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp
     WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.cpp
+    WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp
 )
 
 SET(WebKit2_MESSAGES_IN_FILES

Modified: trunk/Source/WebKit2/ChangeLog (124988 => 124989)


--- trunk/Source/WebKit2/ChangeLog	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/ChangeLog	2012-08-08 05:38:28 UTC (rev 124989)
@@ -1,3 +1,62 @@
+2012-08-07  YoungTaeck Song  <youngtaeck.s...@samsung.com>
+
+        [WK2][EFL] Implement accelerated compositing on WK2 Efl port
+        https://bugs.webkit.org/show_bug.cgi?id=89840
+
+        Reviewed by Noam Rosenthal.
+
+        Implement accelerated composition with TiledBackingStore on WK2 Efl port.
+        This implementation is based on COORDINATED_GRAPHICS.
+
+        * CMakeLists.txt:
+        * PlatformEfl.cmake:
+        * Shared/ShareableSurface.cpp:
+        * Shared/WebCoreArgumentCoders.cpp:
+        * Shared/WebCoreArgumentCoders.h:
+        * UIProcess/API/efl/PageClientImpl.cpp:
+        (WebKit::PageClientImpl::PageClientImpl):
+        (WebKit::PageClientImpl::didChangeContentsSize):
+        (WebKit):
+        * UIProcess/API/efl/PageClientImpl.h:
+        (PageClientImpl):
+        * UIProcess/API/efl/ViewportProcessor.cpp: Added.
+        (WebKit):
+        (WebKit::ViewportProcessor::ViewportProcessor):
+        (WebKit::ViewportProcessor::~ViewportProcessor):
+        (WebKit::ViewportProcessor::display):
+        (WebKit::ViewportProcessor::updateViewportSize):
+        (WebKit::ViewportProcessor::setVisibleContentsRect):
+        (WebKit::ViewportProcessor::didChangeContentsSize):
+        * UIProcess/API/efl/ViewportProcessor.h: Added.
+        (WebKit):
+        (ViewportProcessor):
+        (WebKit::ViewportProcessor::create):
+        (WebKit::ViewportProcessor::drawingArea):
+        (WebKit::ViewportProcessor::viewSize):
+        * UIProcess/API/efl/ewk_view.cpp:
+        (_Ewk_View_Private_Data):
+        (_ewk_view_smart_calculate):
+        (ewk_view_base_add):
+        (ewk_view_display):
+        (ewk_view_contents_size_changed):
+        * UIProcess/API/efl/ewk_view_private.h:
+        * UIProcess/PageClient.h:
+        (PageClient):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit):
+        (WebKit::WebPageProxy::didChangeContentsSize):
+        * UIProcess/WebPageProxy.h:
+        (WebPageProxy):
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp:
+        * WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h:
+        * WebProcess/WebPage/LayerTreeHost.cpp:
+        (WebKit::LayerTreeHost::create):
+        * WebProcess/WebPage/LayerTreeHost.h:
+        (WebKit):
+        * WebProcess/efl/WebProcessMainEfl.cpp:
+        (WebKit::WebProcessMainEfl):
+
 2012-08-07  Csaba Osztrogonác  <o...@webkit.org>
 
        [Qt] New API tests introuduced in r119723 marked as fail, but pass

Modified: trunk/Source/WebKit2/PlatformEfl.cmake (124988 => 124989)


--- trunk/Source/WebKit2/PlatformEfl.cmake	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/PlatformEfl.cmake	2012-08-08 05:38:28 UTC (rev 124989)
@@ -38,6 +38,7 @@
     UIProcess/API/C/soup/WKSoupRequestManager.cpp
 
     UIProcess/API/efl/BatteryProvider.cpp
+    UIProcess/API/efl/EflViewportHandler.cpp
     UIProcess/API/efl/NetworkInfoProvider.cpp
     UIProcess/API/efl/PageClientImpl.cpp
     UIProcess/API/efl/VibrationProvider.cpp
@@ -151,6 +152,7 @@
     ${EFREET_LIBRARIES}
     ${Freetype_LIBRARIES}
     ${LIBXML2_LIBRARIES}
+    ${OPENGL_LIBRARIES}
     ${SQLITE_LIBRARIES}
     ${FONTCONFIG_LIBRARIES}
     ${PNG_LIBRARY}
@@ -172,6 +174,7 @@
     ${EVAS_LIBRARIES}
     ${LIBXML2_LIBRARIES}
     ${LIBXSLT_LIBRARIES}
+    ${OPENGL_LIBRARIES}
     ${SQLITE_LIBRARIES}
 )
 

Modified: trunk/Source/WebKit2/Shared/ShareableSurface.cpp (124988 => 124989)


--- trunk/Source/WebKit2/Shared/ShareableSurface.cpp	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/Shared/ShareableSurface.cpp	2012-08-08 05:38:28 UTC (rev 124989)
@@ -20,6 +20,7 @@
 #include "config.h"
 #include "ShareableSurface.h"
 
+#include "GraphicsContext.h"
 #include "WebCoreArgumentCoders.h"
 
 #if USE(TEXTURE_MAPPER)

Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (124988 => 124989)


--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp	2012-08-08 05:38:28 UTC (rev 124989)
@@ -49,6 +49,7 @@
 #if USE(COORDINATED_GRAPHICS)
 #include <WebCore/Animation.h>
 #include <WebCore/FloatPoint3D.h>
+#include <WebCore/Length.h>
 #include <WebCore/TransformationMatrix.h>
 
 #if ENABLE(CSS_FILTERS)

Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h (124988 => 124989)


--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h	2012-08-08 05:38:28 UTC (rev 124989)
@@ -67,30 +67,19 @@
 }
 #endif
 
-#if PLATFORM(QT)
+#if USE(COORDINATED_GRAPHICS)
 namespace WebCore {
-    class Animation;
     class FloatPoint3D;
-    class Matrix3DTransformOperation;
-    class MatrixTransformOperation;
-    class PerspectiveTransformOperation;
-    class RotateTransformOperation;
-    class ScaleTransformOperation;
-    class SkewTransformOperation;
-    class TimingFunction;
-    class TransformOperation;
-    class TransformOperations;
     class TransformationMatrix;
-    class TranslateTransformOperation;
     struct Length;
 }
-#endif
 
-#if USE(COORDINATED_GRAPHICS) && ENABLE(CSS_FILTERS)
+#if ENABLE(CSS_FILTERS)
 namespace WebCore {
     class FilterOperations;
 }
 #endif
+#endif
 
 namespace CoreIPC {
 

Added: trunk/Source/WebKit2/UIProcess/API/efl/EflViewportHandler.cpp (0 => 124989)


--- trunk/Source/WebKit2/UIProcess/API/efl/EflViewportHandler.cpp	                        (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/efl/EflViewportHandler.cpp	2012-08-08 05:38:28 UTC (rev 124989)
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "EflViewportHandler.h"
+
+#if USE(COORDINATED_GRAPHICS)
+
+#include "LayerTreeCoordinatorProxy.h"
+#include "LayerTreeRenderer.h"
+#include "TransformationMatrix.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+EflViewportHandler::EflViewportHandler(PageClientImpl* pageClientImpl)
+    : m_pageClientImpl(pageClientImpl)
+    , m_scaleFactor(1)
+{
+    ASSERT(m_pageClientImpl);
+}
+
+EflViewportHandler::~EflViewportHandler()
+{
+}
+
+void EflViewportHandler::display(const IntRect& rect)
+{
+    WebCore::TransformationMatrix matrix;
+    matrix.setMatrix(m_scaleFactor, 0, 0, m_scaleFactor, -m_visibleContentRect.x(), -m_visibleContentRect.y());
+
+    LayerTreeRenderer* renderer = drawingArea()->layerTreeCoordinatorProxy()->layerTreeRenderer();
+    renderer->setActive(true);
+    renderer->syncRemoteContent();
+    renderer->paintToCurrentGLContext(matrix, 1, rect);
+}
+
+void EflViewportHandler::updateViewportSize(const IntSize& viewportSize)
+{
+    m_viewportSize = viewportSize;
+    m_pageClientImpl->page()->setViewportSize(viewportSize);
+    setVisibleContentsRect(m_visibleContentRect.location(), m_scaleFactor, FloatPoint());
+}
+
+void EflViewportHandler::setVisibleContentsRect(const IntPoint& newScrollPosition, float newScale, const FloatPoint& trajectory)
+{
+    m_scaleFactor = newScale;
+    m_visibleContentRect = IntRect(newScrollPosition, m_viewportSize);
+
+    // Move visibleContentRect inside contentsRect when visibleContentRect goes outside contentsRect. 
+    IntSize contentsSize = m_contentsSize;
+    contentsSize.scale(m_scaleFactor);
+    if (m_visibleContentRect.x() > contentsSize.width() - m_visibleContentRect.width())
+        m_visibleContentRect.setX(contentsSize.width() - m_visibleContentRect.width());
+    if (m_visibleContentRect.x() < 0)
+        m_visibleContentRect.setX(0);
+    if (m_visibleContentRect.y() > contentsSize.height() - m_visibleContentRect.height())
+        m_visibleContentRect.setY(contentsSize.height() - m_visibleContentRect.height());
+    if (m_visibleContentRect.y() < 0)
+        m_visibleContentRect.setY(0);
+
+    FloatRect mapRectToWebContent = m_visibleContentRect;
+    mapRectToWebContent.scale(1 / m_scaleFactor);
+    drawingArea()->setVisibleContentsRect(enclosingIntRect(mapRectToWebContent), m_scaleFactor, trajectory);
+}
+
+void EflViewportHandler::didChangeContentsSize(const WebCore::IntSize& size)
+{
+    m_contentsSize = size;
+    setVisibleContentsRect(m_visibleContentRect.location(), m_scaleFactor, FloatPoint());
+    drawingArea()->layerTreeCoordinatorProxy()->setContentsSize(WebCore::FloatSize(size.width(), size.height()));
+}
+
+} // namespace WebKit
+#endif // USE(COORDINATED_GRAPHICS)
+

Copied: trunk/Source/WebKit2/UIProcess/API/efl/EflViewportHandler.h (from rev 124988, trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp) (0 => 124989)


--- trunk/Source/WebKit2/UIProcess/API/efl/EflViewportHandler.h	                        (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/efl/EflViewportHandler.h	2012-08-08 05:38:28 UTC (rev 124989)
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef EflViewportHandler_h
+#define EflViewportHandler_h
+
+#if USE(COORDINATED_GRAPHICS)
+
+#include "PageClientImpl.h"
+#include <wtf/PassOwnPtr.h>
+
+namespace WebKit {
+
+class EflViewportHandler {
+public:
+    static PassOwnPtr<EflViewportHandler> create(PageClientImpl* pageClientImpl)
+    {
+        return adoptPtr(new EflViewportHandler(pageClientImpl));
+    }
+    ~EflViewportHandler();
+
+    DrawingAreaProxy* drawingArea() const { return m_pageClientImpl->page()->drawingArea(); }
+    WebCore::IntSize viewSize() { return m_viewportSize; }
+
+    void display(const WebCore::IntRect& rect);
+    void updateViewportSize(const WebCore::IntSize& viewportSize);
+    void setVisibleContentsRect(const WebCore::IntPoint&, float, const WebCore::FloatPoint&);
+    void didChangeContentsSize(const WebCore::IntSize& size);
+
+private:
+    explicit EflViewportHandler(PageClientImpl*);
+
+    PageClientImpl* m_pageClientImpl;
+    WebCore::IntRect m_visibleContentRect;
+    WebCore::IntSize m_contentsSize;
+    WebCore::IntSize m_viewportSize;
+    float m_scaleFactor;
+};
+
+} // namespace WebKit
+
+#endif
+
+#endif // EflViewportHandler_h

Modified: trunk/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp (124988 => 124989)


--- trunk/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp	2012-08-08 05:38:28 UTC (rev 124989)
@@ -31,7 +31,9 @@
 #include "NotImplemented.h"
 #include "WebContext.h"
 #include "WebContextMenuProxy.h"
+#include "WebPageGroup.h"
 #include "WebPageProxy.h"
+#include "WebPreferences.h"
 #include "ewk_context.h"
 #include "ewk_context_private.h"
 #include "ewk_download_job.h"
@@ -46,6 +48,13 @@
     : m_viewWidget(viewWidget)
 {
     m_page = context->createWebPage(this, pageGroup);
+
+#if USE(COORDINATED_GRAPHICS)
+    m_page->pageGroup()->preferences()->setAcceleratedCompositingEnabled(true);
+    m_page->pageGroup()->preferences()->setForceCompositingMode(true);
+    m_page->setUseFixedLayout(true);
+#endif
+
     m_page->initializeWebPage();
 }
 
@@ -295,4 +304,9 @@
 }
 #endif
 
+void PageClientImpl::didChangeContentsSize(const WebCore::IntSize& size)
+{
+    ewk_view_contents_size_changed(m_viewWidget, size);
+}
+
 } // namespace WebKit

Modified: trunk/Source/WebKit2/UIProcess/API/efl/PageClientImpl.h (124988 => 124989)


--- trunk/Source/WebKit2/UIProcess/API/efl/PageClientImpl.h	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/UIProcess/API/efl/PageClientImpl.h	2012-08-08 05:38:28 UTC (rev 124989)
@@ -112,6 +112,8 @@
     virtual void pageDidRequestScroll(const WebCore::IntPoint&);
 #endif
 
+    virtual void didChangeContentsSize(const WebCore::IntSize&);
+
 private:
     RefPtr<WebPageProxy> m_page;
     Evas_Object* m_viewWidget;

Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp (124988 => 124989)


--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp	2012-08-08 05:38:28 UTC (rev 124989)
@@ -53,6 +53,10 @@
 #include <Evas_GL.h>
 #endif
 
+#if USE(COORDINATED_GRAPHICS)
+#include "EflViewportHandler.h"
+#endif
+
 using namespace WebKit;
 using namespace WebCore;
 
@@ -65,6 +69,10 @@
 
 struct _Ewk_View_Private_Data {
     OwnPtr<PageClientImpl> pageClient;
+#if USE(COORDINATED_GRAPHICS)
+    OwnPtr<EflViewportHandler> viewportHandler;
+#endif
+
     const char* uri;
     const char* title;
     const char* theme;
@@ -530,6 +538,10 @@
     evas_object_geometry_get(ewkView, &x, &y, &width, &height);
 
     if (smartData->changed.size) {
+#if USE(COORDINATED_GRAPHICS)
+        priv->viewportHandler->updateViewportSize(IntSize(width, height));
+#endif
+
         if (priv->pageClient->page()->drawingArea())
             priv->pageClient->page()->drawingArea()->setSize(IntSize(width, height), IntSize());
 
@@ -682,6 +694,10 @@
 
     ewk_view_theme_set(ewkView, DEFAULT_THEME_PATH"/default.edj");
 
+#if USE(COORDINATED_GRAPHICS)
+    priv->viewportHandler = EflViewportHandler::create(priv->pageClient.get());
+#endif
+
     return ewkView;
 }
 
@@ -1043,6 +1059,13 @@
     if (!smartData->image)
         return;
 
+#if USE(COORDINATED_GRAPHICS)
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    evas_gl_make_current(priv->evasGl, priv->evasGlSurface, priv->evasGlContext);
+    priv->viewportHandler->display(rect);
+#endif
+
     evas_object_image_data_update_add(smartData->image, rect.x(), rect.y(), rect.width(), rect.height());
 }
 
@@ -1376,3 +1399,13 @@
 
     return true;
 }
+
+void ewk_view_contents_size_changed(const Evas_Object* ewkView, const IntSize& size)
+{
+#if USE(COORDINATED_GRAPHICS)
+    EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData);
+    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
+
+    priv->viewportHandler->didChangeContentsSize(size);
+#endif
+}

Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h (124988 => 124989)


--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h	2012-08-08 05:38:28 UTC (rev 124989)
@@ -70,6 +70,7 @@
 void ewk_view_resource_load_response(Evas_Object* ewkView, uint64_t resourceIdentifier, Ewk_Url_Response* response);
 void ewk_view_resource_request_sent(Evas_Object* ewkView, uint64_t resourceIdentifier, Ewk_Url_Request* request, Ewk_Url_Response* redirectResponse);
 void ewk_view_text_found(Evas_Object* ewkView, unsigned int matchCount);
+void ewk_view_contents_size_changed(const Evas_Object* ewkView, const WebCore::IntSize&);
 
 Evas_Object* ewk_view_base_add(Evas* canvas, WKContextRef, WKPageGroupRef);
 

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h (124988 => 124989)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h	2012-08-08 05:38:28 UTC (rev 124989)
@@ -36,9 +36,11 @@
 #include <wtf/Functional.h>
 #include <wtf/HashSet.h>
 
+#if PLATFORM(QT)
 QT_BEGIN_NAMESPACE
 class QSGNode;
 QT_END_NAMESPACE
+#endif
 
 namespace WebKit {
 

Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (124988 => 124989)


--- trunk/Source/WebKit2/UIProcess/PageClient.h	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h	2012-08-08 05:38:28 UTC (rev 124989)
@@ -118,7 +118,6 @@
     virtual void pageDidRequestScroll(const WebCore::IntPoint&) = 0;
 #endif
 #if PLATFORM(QT)
-    virtual void didChangeContentsSize(const WebCore::IntSize&) = 0;
     virtual void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&) = 0;
     virtual void didReceiveMessageFromNavigatorQtObject(const String&) = 0;
     virtual void updateTextInputState() = 0;
@@ -131,6 +130,10 @@
     virtual void handleDownloadRequest(DownloadProxy*) = 0;
 #endif // PLATFORM(QT) || PLATFORM(EFL)
 
+#if PLATFORM(QT) || PLATFORM(EFL)
+    virtual void didChangeContentsSize(const WebCore::IntSize&) = 0;
+#endif
+
 #if PLATFORM(QT) || PLATFORM(GTK)
     virtual void startDrag(const WebCore::DragData&, PassRefPtr<ShareableBitmap> dragImage) = 0;
 #endif

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (124988 => 124989)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2012-08-08 05:38:28 UTC (rev 124989)
@@ -2635,11 +2635,6 @@
 }
 
 #if PLATFORM(QT)
-void WebPageProxy::didChangeContentsSize(const IntSize& size)
-{
-    m_pageClient->didChangeContentsSize(size);
-}
-
 void WebPageProxy::didFindZoomableArea(const IntPoint& target, const IntRect& area)
 {
     m_pageClient->didFindZoomableArea(target, area);
@@ -2681,6 +2676,13 @@
 }
 #endif // PLATFORM(QT) || PLATFORM(EFL)
 
+#if PLATFORM(QT) || PLATFORM(EFL)
+void WebPageProxy::didChangeContentsSize(const IntSize& size)
+{
+    m_pageClient->didChangeContentsSize(size);
+}
+#endif
+
 #if ENABLE(TOUCH_EVENTS)
 void WebPageProxy::needTouchEvents(bool needTouchEvents)
 {

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (124988 => 124989)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h	2012-08-08 05:38:28 UTC (rev 124989)
@@ -831,9 +831,13 @@
 #endif
 
 #if PLATFORM(QT)
-    void didChangeContentsSize(const WebCore::IntSize&);
     void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&);
 #endif
+
+#if PLATFORM(QT) || PLATFORM(EFL)
+    void didChangeContentsSize(const WebCore::IntSize&);
+#endif
+
 #if ENABLE(TOUCH_EVENTS)
     void needTouchEvents(bool);
 #endif

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (124988 => 124989)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in	2012-08-08 05:38:28 UTC (rev 124989)
@@ -73,12 +73,16 @@
     PageDidRequestScroll(WebCore::IntPoint point)
 #endif
 #if PLATFORM(QT)
-    DidChangeContentsSize(WebCore::IntSize newSize)
     DidFindZoomableArea(WebCore::IntPoint target, WebCore::IntRect area)
     AuthenticationRequiredRequest(WTF::String hostname, WTF::String realm, WTF::String prefilledUsername) -> (WTF::String username, WTF::String password)
     CertificateVerificationRequest(WTF::String hostname) -> (bool ignoreErrors)
     ProxyAuthenticationRequiredRequest(WTF::String hostname, uint16_t port, WTF::String prefilledUsername) -> (WTF::String username, WTF::String password)
 #endif
+
+#if PLATFORM(QT) || PLATFORM(EFL)
+    DidChangeContentsSize(WebCore::IntSize newSize)
+#endif
+
 #if ENABLE(TOUCH_EVENTS)
     NeedTouchEvents(bool needTouchEvents)
 #endif

Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp (124988 => 124989)


--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp	2012-08-08 05:38:28 UTC (rev 124989)
@@ -26,6 +26,7 @@
 
 #include "config.h"
 
+#if USE(COORDINATED_GRAPHICS)
 #include "LayerTreeCoordinator.h"
 
 #include "CoordinatedGraphicsLayer.h"
@@ -571,12 +572,10 @@
         m_shouldSendScrollPositionUpdate = true;
 }
 
-#if USE(COORDINATED_GRAPHICS)
 void LayerTreeCoordinator::scheduleAnimation()
 {
     scheduleLayerFlush();
 }
-#endif
 
 void LayerTreeCoordinator::renderNextFrame()
 {
@@ -620,3 +619,4 @@
 }
 
 } // namespace WebKit
+#endif // USE(COORDINATED_GRAPHICS)

Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h (124988 => 124989)


--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h	2012-08-08 05:38:28 UTC (rev 124989)
@@ -20,6 +20,8 @@
 #ifndef LayerTreeCoordinator_h
 #define LayerTreeCoordinator_h
 
+#if USE(COORDINATED_GRAPHICS)
+
 #include "CoordinatedGraphicsLayer.h"
 #include "LayerTreeContext.h"
 #include "LayerTreeHost.h"
@@ -88,9 +90,7 @@
     virtual void syncFixedLayers();
 
     virtual PassOwnPtr<WebCore::GraphicsContext> beginContentUpdate(const WebCore::IntSize&, ShareableBitmap::Flags, ShareableSurface::Handle&, WebCore::IntPoint&);
-#if USE(COORDINATED_GRAPHICS)
     virtual void scheduleAnimation() OVERRIDE;
-#endif
 
 protected:
     explicit LayerTreeCoordinator(WebPage*);
@@ -143,4 +143,6 @@
 
 }
 
+#endif
+
 #endif // LayerTreeCoordinator_h

Modified: trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp (124988 => 124989)


--- trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp	2012-08-08 05:38:28 UTC (rev 124989)
@@ -34,7 +34,7 @@
 #endif
 #endif
 
-#if PLATFORM(QT)
+#if USE(COORDINATED_GRAPHICS)
 #include "LayerTreeCoordinator.h"
 #endif
 
@@ -52,7 +52,7 @@
     return LayerTreeHostCAMac::create(webPage);
 #elif PLATFORM(WIN) && HAVE(WKQCA)
     return LayerTreeHostCAWin::create(webPage);
-#elif PLATFORM(QT)
+#elif USE(COORDINATED_GRAPHICS)
     return LayerTreeCoordinator::create(webPage);
 #elif PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
     return LayerTreeHostGtk::create(webPage);

Modified: trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h (124988 => 124989)


--- trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h	2012-08-08 05:38:28 UTC (rev 124989)
@@ -119,7 +119,7 @@
 #endif
 };
 
-#if !PLATFORM(WIN) && !PLATFORM(QT)
+#if !PLATFORM(WIN) && !USE(COORDINATED_GRAPHICS)
 inline bool LayerTreeHost::supportsAcceleratedCompositing()
 {
     return true;

Modified: trunk/Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp (124988 => 124989)


--- trunk/Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp	2012-08-08 05:38:28 UTC (rev 124989)
@@ -36,6 +36,10 @@
 #include <unistd.h>
 #include <wtf/MainThread.h>
 
+#if USE(COORDINATED_GRAPHICS)
+#include "CoordinatedGraphicsLayer.h"
+#endif
+
 using namespace WebCore;
 
 namespace WebKit {
@@ -76,6 +80,10 @@
         g_object_unref(resolverEfl);
     }
 
+#if USE(COORDINATED_GRAPHICS)
+    CoordinatedGraphicsLayer::initFactory();
+#endif
+
     int socket = atoi(argv[1]);
     WebProcess::shared().initialize(socket, RunLoop::main());
     RunLoop::run();

Modified: trunk/Source/cmake/OptionsEfl.cmake (124988 => 124989)


--- trunk/Source/cmake/OptionsEfl.cmake	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Source/cmake/OptionsEfl.cmake	2012-08-08 05:38:28 UTC (rev 124989)
@@ -159,3 +159,23 @@
 ENDIF ()
 
 SET(CPACK_SOURCE_GENERATOR TBZ2)
+
+IF (WTF_USE_TILED_BACKING_STORE)
+  SET(WTF_USE_ACCELERATED_COMPOSITING 1)
+  ADD_DEFINITIONS(-DWTF_USE_ACCELERATED_COMPOSITING=1)
+
+  SET(WTF_USE_COORDINATED_GRAPHICS 1)
+  ADD_DEFINITIONS(-DWTF_USE_COORDINATED_GRAPHICS=1)
+
+  SET(WTF_USE_TEXTURE_MAPPER 1)
+  ADD_DEFINITIONS(-DWTF_USE_TEXTURE_MAPPER=1)
+
+  SET(WTF_USE_TEXTURE_MAPPER_GL 1)
+  ADD_DEFINITIONS(-DWTF_USE_TEXTURE_MAPPER_GL=1)
+
+  SET(WTF_USE_3D_GRAPHICS 1)
+  ADD_DEFINITIONS(-DWTF_USE_3D_GRAPHICS=1)
+
+  FIND_PACKAGE(OpenGL REQUIRED)
+ENDIF()
+

Modified: trunk/Tools/ChangeLog (124988 => 124989)


--- trunk/Tools/ChangeLog	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Tools/ChangeLog	2012-08-08 05:38:28 UTC (rev 124989)
@@ -1,3 +1,16 @@
+2012-08-07  YoungTaeck Song  <youngtaeck.s...@samsung.com>
+
+        [WK2][EFL] Implement accelerated compositing on WK2 Efl port
+        https://bugs.webkit.org/show_bug.cgi?id=89840
+
+        Reviewed by Noam Rosenthal.
+
+        Implement accelerated composition with TiledBackingStore on WK2 Efl port.
+        Add OPENGL_LIBRARIES in CMakeList.txt.
+
+        * MiniBrowser/efl/CMakeLists.txt:
+        * WebKitTestRunner/PlatformEfl.cmake:
+
 2012-08-07  Csaba Osztrogonác  <o...@webkit.org>
 
         [NRWT] REGRESSION(r124967): New tests without expected results handled as failures

Modified: trunk/Tools/MiniBrowser/efl/CMakeLists.txt (124988 => 124989)


--- trunk/Tools/MiniBrowser/efl/CMakeLists.txt	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Tools/MiniBrowser/efl/CMakeLists.txt	2012-08-08 05:38:28 UTC (rev 124989)
@@ -28,6 +28,7 @@
     ${LIBSOUP24_LIBRARIES}
     ${LIBXML2_LIBRARIES}
     ${LIBXSLT_LIBRARIES}
+    ${OPENGL_LIBRARIES}
     ${SQLITE_LIBRARIES}
 )
 

Modified: trunk/Tools/WebKitTestRunner/PlatformEfl.cmake (124988 => 124989)


--- trunk/Tools/WebKitTestRunner/PlatformEfl.cmake	2012-08-08 05:34:45 UTC (rev 124988)
+++ trunk/Tools/WebKitTestRunner/PlatformEfl.cmake	2012-08-08 05:38:28 UTC (rev 124989)
@@ -43,6 +43,7 @@
     ${EDJE_LIBRARIES}
     ${EFLDEPS_LIBRARIES}
     ${Glib_LIBRARIES}
+    ${OPENGL_LIBRARIES}
     ${WTF_LIBRARY_NAME}
 )
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to