[EFL] --no-tiled-backing-store build fails because of not used #if USE(ACCELERATED_CO...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Apr 2013 20:29:44 +0000 (20:29 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Apr 2013 20:29:44 +0000 (20:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=113627

Patch by Ed Bartosh <bartosh@gmail.com> on 2013-04-05
Reviewed by Simon Fraser.

.:

* Source/cmake/OptionsEfl.cmake: Disabled 3D_GRAPHICS and WEB_GL when accelerated compositing is on

Source/WebCore:

       Wrapped code with #if USE(ACCELERATED_COMPOSITING) to make it compilable
       with --no-tiled-backing-store build option:
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::animate):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::animate):
* platform/graphics/TextTrackRepresentation.cpp:
(NullTextTrackRepresentation):
* platform/graphics/TextTrackRepresentation.h:
(TextTrackRepresentation):
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setHeaderHeight):
(WebCore::Internals::setFooterHeight):

Source/WebKit2:

Wrapped code with #if USE(ACCELERATED_COMPOSITING) to make it compilable
with --no-tiled-backing-store build option:
* UIProcess/API/C/efl/WKView.cpp:
* UIProcess/API/efl/EvasGLContext.cpp:
* UIProcess/API/efl/EvasGLContext.h:
* UIProcess/API/efl/EvasGLSurface.cpp:
* UIProcess/API/efl/EvasGLSurface.h:
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
(EwkView::displayTimerFired):
(EwkView::takeSnapshot):
* UIProcess/API/efl/EwkView.h:
(WebKit):
(EwkView):
* UIProcess/API/efl/SnapshotImageGL.cpp:
* UIProcess/API/efl/SnapshotImageGL.h:
* UIProcess/PageViewportController.cpp:
* UIProcess/PageViewportController.h:
* UIProcess/efl/PageViewportControllerClientEfl.cpp:
* UIProcess/efl/ViewClientEfl.cpp:
(WebKit::ViewClientEfl::didChangeContentsSize):
* UIProcess/efl/WebView.cpp:
(WebKit::WebView::didCommitLoad):
(WebKit::WebView::updateViewportSize):
(WebKit::WebView::didChangeViewportProperties):
(WebKit::WebView::pageDidRequestScroll):
(WebKit::WebView::didRenderFrame):
(WebKit::WebView::pageTransitionViewportReady):

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

23 files changed:
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/page/animation/ImplicitAnimation.cpp
Source/WebCore/page/animation/KeyframeAnimation.cpp
Source/WebCore/platform/graphics/TextTrackRepresentation.cpp
Source/WebCore/platform/graphics/TextTrackRepresentation.h
Source/WebCore/testing/Internals.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/C/efl/WKView.cpp
Source/WebKit2/UIProcess/API/efl/EvasGLContext.cpp
Source/WebKit2/UIProcess/API/efl/EvasGLContext.h
Source/WebKit2/UIProcess/API/efl/EvasGLSurface.cpp
Source/WebKit2/UIProcess/API/efl/EvasGLSurface.h
Source/WebKit2/UIProcess/API/efl/EwkView.cpp
Source/WebKit2/UIProcess/API/efl/EwkView.h
Source/WebKit2/UIProcess/API/efl/SnapshotImageGL.cpp
Source/WebKit2/UIProcess/API/efl/SnapshotImageGL.h
Source/WebKit2/UIProcess/PageViewportController.cpp
Source/WebKit2/UIProcess/PageViewportController.h
Source/WebKit2/UIProcess/efl/PageViewportControllerClientEfl.cpp
Source/WebKit2/UIProcess/efl/ViewClientEfl.cpp
Source/WebKit2/UIProcess/efl/WebView.cpp
Source/cmake/OptionsEfl.cmake

index 2d02f13..e4ff01e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-04-05  Ed Bartosh  <bartosh@gmail.com>
+
+        [EFL] --no-tiled-backing-store build fails because of not used #if USE(ACCELERATED_COMPOSITING)
+        https://bugs.webkit.org/show_bug.cgi?id=113627
+
+        Reviewed by Simon Fraser.
+
+        * Source/cmake/OptionsEfl.cmake: Disabled 3D_GRAPHICS and WEB_GL when accelerated compositing is on
+
 2013-04-05  Rijubrata Bhaumik  <rijubrata.bhaumik@intel.com>
 
         [EFL] Enable indexed database
index 56b9394..bccbaed 100644 (file)
@@ -1,3 +1,25 @@
+2013-04-05  Ed Bartosh  <bartosh@gmail.com>
+
+        [EFL] --no-tiled-backing-store build fails because of not used #if USE(ACCELERATED_COMPOSITING)
+        https://bugs.webkit.org/show_bug.cgi?id=113627
+
+        Reviewed by Simon Fraser.
+
+       Wrapped code with #if USE(ACCELERATED_COMPOSITING) to make it compilable
+       with --no-tiled-backing-store build option:
+        * page/animation/ImplicitAnimation.cpp:
+        (WebCore::ImplicitAnimation::animate):
+        * page/animation/KeyframeAnimation.cpp:
+        (WebCore::KeyframeAnimation::animate):
+        * platform/graphics/TextTrackRepresentation.cpp:
+        (NullTextTrackRepresentation):
+        * platform/graphics/TextTrackRepresentation.h:
+        (TextTrackRepresentation):
+        * testing/Internals.cpp:
+        (WebCore::Internals::resetToConsistentState):
+        (WebCore::Internals::setHeaderHeight):
+        (WebCore::Internals::setFooterHeight):
+
 2013-04-05  Ryosuke Niwa  <rniwa@webkit.org>
 
         Remove the remaining Chromium files from WebCore
index 37a2f72..2541502 100644 (file)
@@ -78,10 +78,10 @@ void ImplicitAnimation::animate(CompositeAnimation*, RenderObject*, const Render
     if (!animatedStyle)
         animatedStyle = RenderStyle::clone(targetStyle);
 
+#if USE(ACCELERATED_COMPOSITING)
     bool needsAnim = CSSPropertyAnimation::blendProperties(this, m_animatingProperty, animatedStyle.get(), m_fromStyle.get(), m_toStyle.get(), progress(1, 0, 0));
     // FIXME: we also need to detect cases where we have to software animate for other reasons,
     // such as a child using inheriting the transform. https://bugs.webkit.org/show_bug.cgi?id=23902
-#if USE(ACCELERATED_COMPOSITING)
     if (!needsAnim)
         // If we are running an accelerated animation, set a flag in the style which causes the style
         // to compare as different to any other style. This ensures that changes to the property
index 0425a52..538ef04 100644 (file)
@@ -185,9 +185,8 @@ void KeyframeAnimation::animate(CompositeAnimation*, RenderObject*, const Render
         const RenderStyle* toStyle = 0;
         double progress = 0.0;
         fetchIntervalEndpointsForProperty(*it, fromStyle, toStyle, progress);
-    
-        bool needsAnim = CSSPropertyAnimation::blendProperties(this, *it, animatedStyle.get(), fromStyle, toStyle, progress);
 #if USE(ACCELERATED_COMPOSITING)
+        bool needsAnim = CSSPropertyAnimation::blendProperties(this, *it, animatedStyle.get(), fromStyle, toStyle, progress);
         if (!needsAnim)
             // If we are running an accelerated animation, set a flag in the style
             // to indicate it. This can be used to make sure we get an updated
index 3c3423b..68e4c2d 100644 (file)
@@ -35,7 +35,9 @@ class NullTextTrackRepresentation : public TextTrackRepresentation {
 public:
     virtual ~NullTextTrackRepresentation() { }
     virtual void update() { }
+#if USE(ACCELERATED_COMPOSITING)
     virtual PlatformLayer* platformLayer() { return 0; }
+#endif
     virtual void setContentScale(float) { }
     virtual IntRect bounds() const { return IntRect(); }
 };
index 2a4f527..63923bc 100644 (file)
@@ -52,7 +52,9 @@ public:
     virtual ~TextTrackRepresentation() { }
 
     virtual void update() = 0;
+#if USE(ACCELERATED_COMPOSITING)
     virtual PlatformLayer* platformLayer() = 0;
+#endif
     virtual void setContentScale(float) = 0;
     virtual IntRect bounds() const = 0;
 };
index 3863ccd..bba0983 100644 (file)
@@ -259,10 +259,14 @@ void Internals::resetToConsistentState(Page* page)
 
     page->setPageScaleFactor(1, IntPoint(0, 0));
     page->setPagination(Pagination());
-    if (FrameView* mainFrameView = page->mainFrame()->view()) {
+
+#if USE(ACCELERATED_COMPOSITING)
+    FrameView* mainFrameView = page->mainFrame()->view();
+    if (mainFrameView) {
         mainFrameView->setHeaderHeight(0);
         mainFrameView->setFooterHeight(0);
     }
+#endif
     TextRun::setAllowsRoundingHacks(false);
     WebCore::overrideUserPreferredLanguages(Vector<String>());
     WebCore::Settings::setUsesOverlayScrollbars(false);
@@ -1850,18 +1854,20 @@ void Internals::setHeaderHeight(Document* document, float height)
 {
     if (!document || !document->view())
         return;
-
+#if USE(ACCELERATED_COMPOSITING)
     FrameView* frameView = document->view();
     frameView->setHeaderHeight(height);
+#endif
 }
 
 void Internals::setFooterHeight(Document* document, float height)
 {
     if (!document || !document->view())
         return;
-
+#if USE(ACCELERATED_COMPOSITING)
     FrameView* frameView = document->view();
     frameView->setFooterHeight(height);
+#endif
 }
 
 #if ENABLE(FULLSCREEN_API)
index 29187fd..c685688 100644 (file)
@@ -1,5 +1,41 @@
 2013-04-05  Ed Bartosh  <bartosh@gmail.com>
 
+        [EFL] --no-tiled-backing-store build fails because of not used #if USE(ACCELERATED_COMPOSITING)
+        https://bugs.webkit.org/show_bug.cgi?id=113627
+
+        Reviewed by Simon Fraser.
+
+        Wrapped code with #if USE(ACCELERATED_COMPOSITING) to make it compilable
+        with --no-tiled-backing-store build option:
+        * UIProcess/API/C/efl/WKView.cpp:
+        * UIProcess/API/efl/EvasGLContext.cpp:
+        * UIProcess/API/efl/EvasGLContext.h:
+        * UIProcess/API/efl/EvasGLSurface.cpp:
+        * UIProcess/API/efl/EvasGLSurface.h:
+        * UIProcess/API/efl/EwkView.cpp:
+        (EwkView::EwkView):
+        (EwkView::displayTimerFired):
+        (EwkView::takeSnapshot):
+        * UIProcess/API/efl/EwkView.h:
+        (WebKit):
+        (EwkView):
+        * UIProcess/API/efl/SnapshotImageGL.cpp:
+        * UIProcess/API/efl/SnapshotImageGL.h:
+        * UIProcess/PageViewportController.cpp:
+        * UIProcess/PageViewportController.h:
+        * UIProcess/efl/PageViewportControllerClientEfl.cpp:
+        * UIProcess/efl/ViewClientEfl.cpp:
+        (WebKit::ViewClientEfl::didChangeContentsSize):
+        * UIProcess/efl/WebView.cpp:
+        (WebKit::WebView::didCommitLoad):
+        (WebKit::WebView::updateViewportSize):
+        (WebKit::WebView::didChangeViewportProperties):
+        (WebKit::WebView::pageDidRequestScroll):
+        (WebKit::WebView::didRenderFrame):
+        (WebKit::WebView::pageTransitionViewportReady):
+
+2013-04-05  Ed Bartosh  <bartosh@gmail.com>
+
         [EFL][WK2] --no-tiled-backing-store build fails because of not used #if USE(COORDINATED_GRAPHICS)
         https://bugs.webkit.org/show_bug.cgi?id=113629
 
index 5dbc31e..f867412 100644 (file)
@@ -107,10 +107,12 @@ WKPoint WKViewUserViewportToContents(WKViewRef viewRef, WKPoint point)
     return WKPointMake(result.x(), result.y());
 }
 
+#if USE(ACCELERATED_COMPOSITING)
 void WKViewPaintToCurrentGLContext(WKViewRef viewRef)
 {
     toImpl(viewRef)->paintToCurrentGLContext();
 }
+#endif
 
 void WKViewPaintToCairoSurface(WKViewRef viewRef, cairo_surface_t* surface)
 {
index 8198d61..862ddbb 100644 (file)
@@ -24,6 +24,9 @@
  */
 
 #include "config.h"
+
+#if USE(ACCELERATED_COMPOSITING)
+
 #include "EvasGLContext.h"
 
 namespace WebKit {
@@ -42,3 +45,4 @@ EvasGLContext::~EvasGLContext()
 }
 
 } // namespace WebKit
+#endif
index 886159b..2ef7364 100644 (file)
@@ -25,6 +25,7 @@
 
 #ifndef EvasGLContext_h
 #define EvasGLContext_h
+#if USE(ACCELERATED_COMPOSITING)
 
 #include <Evas_GL.h>
 #include <wtf/PassOwnPtr.h>
@@ -56,4 +57,5 @@ private:
 
 } // namespace WebKit
 
+#endif // USE(ACCELERATED_COMPOSITING)
 #endif // EvasGLContext_h
index 16301ca..c7ec13c 100644 (file)
@@ -24,6 +24,8 @@
  */
 
 #include "config.h"
+#if USE(ACCELERATED_COMPOSITING)
+
 #include "EvasGLSurface.h"
 
 namespace WebKit {
@@ -42,3 +44,4 @@ EvasGLSurface::~EvasGLSurface()
 }
 
 } // namespace WebKit
+#endif
index da76b1c..f6fb2b5 100644 (file)
@@ -25,6 +25,7 @@
 
 #ifndef EvasGLSurface_h
 #define EvasGLSurface_h
+#if USE(ACCELERATED_COMPOSITING)
 
 #include <Evas_GL.h>
 #include <WebCore/IntSize.h>
@@ -64,4 +65,5 @@ private:
 
 } // namespace WebKit
 
+#endif // USE(ACCELERATED_COMPOSITING)
 #endif // EvasGLSurface_h
index af9b8e7..33167d9 100644 (file)
@@ -64,7 +64,9 @@
 #include <Ecore_Evas.h>
 #include <Ecore_X.h>
 #include <Edje.h>
+#if USE(ACCELERATED_COMPOSITING)
 #include <Evas_GL.h>
+#endif
 #include <WebCore/CairoUtilitiesEfl.h>
 #include <WebCore/Cursor.h>
 #include <WebCore/PlatformContextCairo.h>
@@ -259,8 +261,10 @@ EwkView::EwkView(WKViewRef view, Evas_Object* evasObject)
 #endif
     , m_displayTimer(this, &EwkView::displayTimerFired)
     , m_inputMethodContext(InputMethodContextEfl::create(this, smartData()->base.evas))
+#if USE(ACCELERATED_COMPOSITING)
     , m_pageViewportControllerClient(PageViewportControllerClientEfl::create(this))
     , m_pageViewportController(adoptPtr(new PageViewportController(page(), m_pageViewportControllerClient.get())))
+#endif
     , m_isAccelerated(true)
 {
     ASSERT(m_evasObject);
@@ -268,7 +272,7 @@ EwkView::EwkView(WKViewRef view, Evas_Object* evasObject)
 
     // FIXME: Remove when possible.
     webView()->setEwkView(this);
-
+#if USE(ACCELERATED_COMPOSITING)
     m_evasGL = adoptPtr(evas_gl_new(evas_object_evas_get(m_evasObject)));
     if (m_evasGL)
         m_evasGLContext = EvasGLContext::create(m_evasGL.get());
@@ -277,13 +281,14 @@ EwkView::EwkView(WKViewRef view, Evas_Object* evasObject)
         WARN("Failed to create Evas_GL, falling back to software mode.");
         m_isAccelerated = false;
     }
-
+#endif
     WKViewInitialize(wkView());
 
     WKPageGroupRef wkPageGroup = WKPageGetPageGroup(wkPage());
     WKPreferencesRef wkPreferences = WKPageGroupGetPreferences(wkPageGroup);
-
+#if USE(ACCELERATED_COMPOSITING)
     WKPreferencesSetWebGLEnabled(wkPreferences, true);
+#endif
     WKPreferencesSetFullScreenEnabled(wkPreferences, true);
     WKPreferencesSetWebAudioEnabled(wkPreferences, true);
     WKPreferencesSetOfflineWebApplicationCacheEnabled(wkPreferences, true);
@@ -529,10 +534,11 @@ void EwkView::displayTimerFired(Timer<EwkView>*)
     Ewk_View_Smart_Data* sd = smartData();
 
     if (m_pendingSurfaceResize) {
+#if USE(ACCELERATED_COMPOSITING)
         // Create a GL surface here so that Evas has no chance of painting to an empty GL surface.
         if (!createGLSurface())
             return;
-
+#endif
         m_pendingSurfaceResize = false;
     }
 
@@ -545,11 +551,11 @@ void EwkView::displayTimerFired(Timer<EwkView>*)
         evas_object_image_data_update_add(sd->image, 0, 0, sd->view.w, sd->view.h);
         return;
     }
-
+#if USE(ACCELERATED_COMPOSITING)
     evas_gl_make_current(m_evasGL.get(), m_evasGLSurface->surface(), m_evasGLContext->context());
 
     WKViewPaintToCurrentGLContext(wkView());
-
+#endif
     // sd->image is tied to a native surface, which is in the parent's coordinates.
     evas_object_image_data_update_add(sd->image, sd->view.x, sd->view.y, sd->view.w, sd->view.h);
 }
@@ -719,6 +725,7 @@ void EwkView::setTouchEventsEnabled(bool enabled)
 }
 #endif
 
+#if USE(ACCELERATED_COMPOSITING)
 bool EwkView::createGLSurface()
 {
     if (!m_isAccelerated)
@@ -752,6 +759,7 @@ bool EwkView::createGLSurface()
 
     return true;
 }
+#endif
 
 #if ENABLE(INPUT_TYPE_COLOR)
 /**
@@ -1101,8 +1109,10 @@ void EwkView::handleEvasObjectCalculate(Evas_Object* evasObject)
         smartData->view.h = height;
 
         WKViewSetSize(self->wkView(), WKSizeMake(width, height));
+#if USE(ACCELERATED_COMPOSITING)
         if (WKPageUseFixedLayout(self->wkPage()))
             self->pageViewportController()->didChangeViewportSize(self->size());
+#endif
 
         self->setNeedsSurfaceResize();
     }
@@ -1269,15 +1279,16 @@ PassRefPtr<cairo_surface_t> EwkView::takeSnapshot()
         ecore_main_loop_iterate();
 
     Ewk_View_Smart_Data* sd = smartData();
-    if (!m_isAccelerated) {
-        RefPtr<cairo_surface_t> snapshot = createSurfaceForImage(sd->image);
+#if USE(ACCELERATED_COMPOSITING)
+    if (m_isAccelerated) {
+        RefPtr<cairo_surface_t> snapshot = getImageSurfaceFromFrameBuffer(0, 0, sd->view.w, sd->view.h);
         // Resume all animations.
         WKViewResumeActiveDOMObjectsAndAnimations(wkView());
 
         return snapshot.release();
     }
-
-    RefPtr<cairo_surface_t> snapshot = getImageSurfaceFromFrameBuffer(0, 0, sd->view.w, sd->view.h);
+#endif
+    RefPtr<cairo_surface_t> snapshot = createSurfaceForImage(sd->image);
     // Resume all animations.
     WKViewResumeActiveDOMObjectsAndAnimations(wkView());
 
index f2d3a4c..a58b6dc 100644 (file)
@@ -62,8 +62,10 @@ class PageLoadClientEfl;
 class PagePolicyClientEfl;
 class PageUIClientEfl;
 class ViewClientEfl;
+#if USE(ACCELERATED_COMPOSITING)
 class PageViewportController;
 class PageViewportControllerClientEfl;
+#endif
 class WebContextMenuItemData;
 class WebContextMenuProxyEfl;
 class WebPageGroup;
@@ -92,8 +94,10 @@ class EwkPopupMenu;
 class EwkSettings;
 class EwkWindowFeatures;
 
+#if USE(ACCELERATED_COMPOSITING)
 typedef struct _Evas_GL_Context Evas_GL_Context;
 typedef struct _Evas_GL_Surface Evas_GL_Surface;
+#endif
 
 typedef struct Ewk_View_Smart_Data Ewk_View_Smart_Data;
 typedef struct Ewk_View_Smart_Class Ewk_View_Smart_Class;
@@ -117,7 +121,10 @@ public:
     EwkSettings* settings() { return m_settings.get(); }
     EwkBackForwardList* backForwardList() { return m_backForwardList.get(); }
     EwkWindowFeatures* windowFeatures();
+
+#if USE(ACCELERATED_COMPOSITING)
     WebKit::PageViewportController* pageViewportController() { return m_pageViewportController.get(); }
+#endif
 
     void setDeviceScaleFactor(float scale);
     float deviceScaleFactor() const;
@@ -153,8 +160,9 @@ public:
 
     WKRect windowGeometry() const;
     void setWindowGeometry(const WKRect&);
-
+#if USE(ACCELERATED_COMPOSITING)
     bool createGLSurface();
+#endif
     void setNeedsSurfaceResize() { m_pendingSurfaceResize = true; }
 
 #if ENABLE(INPUT_TYPE_COLOR)
@@ -239,9 +247,11 @@ private:
     Evas_Object* m_evasObject;
     RefPtr<EwkContext> m_context;
     RefPtr<EwkPageGroup> m_pageGroup;
+#if USE(ACCELERATED_COMPOSITING)
     OwnPtr<Evas_GL> m_evasGL;
     OwnPtr<WebKit::EvasGLContext> m_evasGLContext;
     OwnPtr<WebKit::EvasGLSurface> m_evasGLSurface;
+#endif
     WebCore::TransformationMatrix m_userViewportTransform;
     bool m_pendingSurfaceResize;
     OwnPtr<WebKit::PageLoadClientEfl> m_pageLoadClient;
@@ -273,8 +283,10 @@ private:
 #if ENABLE(INPUT_TYPE_COLOR)
     OwnPtr<EwkColorPicker> m_colorPicker;
 #endif
+#if USE(ACCELERATED_COMPOSITING)
     OwnPtr<WebKit::PageViewportControllerClientEfl> m_pageViewportControllerClient;
     OwnPtr<WebKit::PageViewportController> m_pageViewportController;
+#endif
     bool m_isAccelerated;
 
     static Evas_Smart_Class parentSmartClass;
index efd2619..8e0b9d8 100644 (file)
@@ -24,6 +24,9 @@
 */
 
 #include "config.h"
+
+#if USE(ACCELERATED_COMPOSITING)
+
 #include "SnapshotImageGL.h"
 
 #if USE(OPENGL_ES_2)
@@ -70,3 +73,4 @@ PassRefPtr<cairo_surface_t> getImageSurfaceFromFrameBuffer(int x, int y, int wid
     cairo_surface_mark_dirty(newSurface.get());
     return newSurface;
 }
+#endif
index abcd787..68c1428 100644 (file)
 #ifndef SnapshotImageGL_h
 #define SnapshotImageGL_h
 
+#if USE(ACCELERATED_COMPOSITING)
+
 #include <RefPtrCairo.h>
 #include <wtf/OwnArrayPtr.h>
 
 PassRefPtr<cairo_surface_t> getImageSurfaceFromFrameBuffer(int x, int y, int width, int height);
 
+#endif // USE(ACCELERATED_COMPOSITING)
 #endif // SnapshotImageGL_h
index e1156ab..56017dd 100644 (file)
@@ -20,9 +20,9 @@
  */
 
 #include "config.h"
-#include "PageViewportController.h"
 
-#if USE(TILED_BACKING_STORE)
+#if USE(ACCELERATED_COMPOSITING)
+#include "PageViewportController.h"
 
 #include "PageViewportControllerClient.h"
 #include "WebPageProxy.h"
index 3164efd..b8973ab 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef PageViewportController_h
 #define PageViewportController_h
 
+#if USE(ACCELERATED_COMPOSITING)
+
 #include <WebCore/FloatPoint.h>
 #include <WebCore/FloatRect.h>
 #include <WebCore/FloatSize.h>
@@ -110,4 +112,5 @@ bool fuzzyCompare(float, float, float epsilon);
 
 } // namespace WebKit
 
+#endif // USE(ACCELERATED_COMPOSITING)
 #endif // PageViewportController_h
index cbc4323..22a45b5 100644 (file)
@@ -25,6 +25,9 @@
  */
 
 #include "config.h"
+
+#if USE(ACCELERATED_COMPOSITING)
+
 #include "PageViewportControllerClientEfl.h"
 
 #include "EwkView.h"
@@ -78,3 +81,4 @@ void PageViewportControllerClientEfl::setController(PageViewportController* cont
 }
 
 } // namespace WebKit
+#endif // USE(ACCELERATED_COMPOSITING)
index d9ebb32..52b3dbb 100644 (file)
@@ -49,7 +49,11 @@ void ViewClientEfl::didChangeContentsSize(WKViewRef, WKSize size, const void* cl
 {
     EwkView* ewkView = toEwkView(clientInfo);
     if (WKPageUseFixedLayout(ewkView->wkPage()))
+#if USE(ACCELERATED_COMPOSITING)
         ewkView->pageViewportController()->didChangeContentsSize(toIntSize(size));
+#else
+        { }
+#endif
     else
         ewkView->scheduleUpdateDisplay();
 
index b901349..679a5be 100644 (file)
@@ -234,7 +234,9 @@ void WebView::initializeClient(const WKViewClient* client)
 void WebView::didCommitLoad()
 {
     if (m_page->useFixedLayout()) {
+#if USE(ACCELERATED_COMPOSITING)
         m_ewkView->pageViewportController()->didCommitLoad();
+#endif
         return;
     }
     m_ewkView->scheduleUpdateDisplay();
@@ -539,7 +541,9 @@ FloatRect WebView::convertToUserSpace(const FloatRect& deviceRect)
 void WebView::didChangeViewportProperties(const WebCore::ViewportAttributes& attr)
 {
     if (m_page->useFixedLayout()) {
+#if USE(ACCELERATED_COMPOSITING)
         m_ewkView->pageViewportController()->didChangeViewportAttributes(attr);
+#endif
         return;
     }
     m_ewkView->scheduleUpdateDisplay();
@@ -547,8 +551,10 @@ void WebView::didChangeViewportProperties(const WebCore::ViewportAttributes& att
 
 void WebView::pageDidRequestScroll(const IntPoint& position)
 {
-    if (m_page->useFixedLayout()) {        
+    if (m_page->useFixedLayout()) {
+#if USE(ACCELERATED_COMPOSITING)
         m_ewkView->pageViewportController()->pageDidRequestScroll(position);
+#endif
         return;
     }
     FloatPoint uiPosition(position);
@@ -560,7 +566,9 @@ void WebView::pageDidRequestScroll(const IntPoint& position)
 void WebView::didRenderFrame(const WebCore::IntSize& contentsSize, const WebCore::IntRect& coveredRect)
 {
     if (m_page->useFixedLayout()) {
+#if USE(ACCELERATED_COMPOSITING)
         m_ewkView->pageViewportController()->didRenderFrame(contentsSize, coveredRect);
+#endif
         return;
     }
     m_ewkView->scheduleUpdateDisplay();
@@ -569,7 +577,9 @@ void WebView::didRenderFrame(const WebCore::IntSize& contentsSize, const WebCore
 void WebView::pageTransitionViewportReady()
 {
     if (m_page->useFixedLayout()) {
+#if USE(ACCELERATED_COMPOSITING)
         m_ewkView->pageViewportController()->pageTransitionViewportReady();
+#endif
         return;
     }
     m_ewkView->scheduleUpdateDisplay();
index 4d6ef81..ddf1704 100644 (file)
@@ -176,6 +176,26 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
     find_package(GStreamer REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
 endif ()
 
+if (WTF_USE_TILED_BACKING_STORE)
+    add_definitions(-DWTF_USE_ACCELERATED_COMPOSITING=1)
+
+    add_definitions(-DWTF_USE_COORDINATED_GRAPHICS=1)
+
+    set(WTF_USE_TEXTURE_MAPPER 1)
+    add_definitions(-DWTF_USE_TEXTURE_MAPPER=1)
+
+    set(WTF_USE_3D_GRAPHICS 1)
+    add_definitions(-DWTF_USE_3D_GRAPHICS=1)
+
+    set(ENABLE_3D_RENDERING 1)
+    add_definitions(-DENABLE_3D_RENDERING=1)
+else ()
+    # Disable 3D graphics and WEBGL if tiled backing is disabled
+    set(ENABLE_WEBGL 0)
+    set(WTF_USE_3D_GRAPHICS 0)
+    add_definitions(-DWTF_USE_3D_GRAPHICS=0)
+endif ()
+
 if (ENABLE_WEBGL OR WTF_USE_TILED_BACKING_STORE)
     find_package(OpenGL REQUIRED)
     CHECK_INCLUDE_FILES("GL/glx.h" OPENGLX_FOUND)
@@ -231,21 +251,6 @@ if (CMAKE_BUILD_TYPE STREQUAL release AND CMAKE_COMPILER_IS_GNUCC AND UNIX AND N
     set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--gc-sections ${CMAKE_SHARED_LINKER_FLAGS}")
 endif ()
 
-if (WTF_USE_TILED_BACKING_STORE)
-    add_definitions(-DWTF_USE_ACCELERATED_COMPOSITING=1)
-
-    add_definitions(-DWTF_USE_COORDINATED_GRAPHICS=1)
-
-    set(WTF_USE_TEXTURE_MAPPER 1)
-    add_definitions(-DWTF_USE_TEXTURE_MAPPER=1)
-
-    set(WTF_USE_3D_GRAPHICS 1)
-    add_definitions(-DWTF_USE_3D_GRAPHICS=1)
-
-    set(ENABLE_3D_RENDERING 1)
-    add_definitions(-DENABLE_3D_RENDERING=1)
-endif ()
-
 if (ENABLE_WEBGL)
     set(ENABLE_WEBGL 1)
     if (USE_GRAPHICS_SURFACE)