tizen beta release
[framework/web/webkit-efl.git] / Source / WebCore / rendering / RenderLayerCompositor.h
index fe0188d..2eba427 100755 (executable)
@@ -135,6 +135,7 @@ public:
 
     RenderLayer* rootRenderLayer() const;
     GraphicsLayer* rootGraphicsLayer() const;
+    GraphicsLayer* scrollLayer() const;
 
     enum RootLayerAttachment {
         RootLayerUnattached,
@@ -151,6 +152,13 @@ public:
 
     void clearBackingForAllLayers();
     
+    void layerBecameComposited(const RenderLayer*) { ++m_compositedLayerCount; }
+    void layerBecameNonComposited(const RenderLayer*)
+    {
+        ASSERT(m_compositedLayerCount > 0);
+        --m_compositedLayerCount;
+    }
+    
     void didStartAcceleratedAnimation(CSSPropertyID);
     
 #if ENABLE(VIDEO)
@@ -200,6 +208,14 @@ public:
     GraphicsLayer* layerForOverhangAreas() const { return m_layerForOverhangAreas.get(); }
 #endif
 
+#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
+    void platformLayerChanged(RenderLayer*, PlatformLayer* oldLayer, PlatformLayer* newLayer);
+    void scrollingLayerAddedOrUpdated(RenderLayer*, PlatformLayer* scrollingLayer, PlatformLayer* contentsLayer, const IntSize& scrollSize);
+    void scrollingLayerRemoved(RenderLayer*, PlatformLayer* scrollingLayer, PlatformLayer* contentsLayer);
+    void registerAllScrollingLayers();
+    void unregisterAllScrollingLayers();
+#endif
+
 private:
     // GraphicsLayerClient Implementation
     virtual void notifyAnimationStarted(const GraphicsLayer*, double) { }
@@ -210,6 +226,9 @@ private:
     // (the clipLayer and scrollLayer) should never show debugging info.
     virtual bool showDebugBorders() const { return false; }
     virtual bool showRepaintCounter() const { return false; }
+#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
+    virtual void platformLayerChanged(GraphicsLayer*, PlatformLayer* /* oldPlatformLayer */, PlatformLayer* /* newPlatformLayer */) { }
+#endif
     
     // Whether the given RL needs a compositing layer.
     bool needsToBeComposited(const RenderLayer*) const;
@@ -248,6 +267,8 @@ private:
 
     bool layerHas3DContent(const RenderLayer*) const;
     bool hasNonIdentity3DTransform(RenderObject*) const;
+    
+    bool hasAnyAdditionalCompositedLayers(const RenderLayer* rootLayer) const;
 
     void ensureRootLayer();
     void destroyRootLayer();
@@ -272,7 +293,11 @@ private:
     bool requiresCompositingForFrame(RenderObject*) const;
     bool requiresCompositingWhenDescendantsAreCompositing(RenderObject*) const;
     bool requiresCompositingForFullScreen(RenderObject*) const;
+#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
+    bool requiresCompositingForScrolling(RenderObject* renderer) const;
+#endif
     bool requiresCompositingForScrollableFrame() const;
+    bool requiresCompositingForPosition(RenderObject*, const RenderLayer*) const;
 
     bool requiresScrollLayer(RootLayerAttachment) const;
     bool requiresHorizontalScrollbarLayer() const;
@@ -282,6 +307,10 @@ private:
     bool requiresOverhangAreasLayer() const;
 #endif
 
+#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
+    ChromeClient* chromeClient() const;
+#endif
+
 private:
     RenderView* m_renderView;
     OwnPtr<GraphicsLayer> m_rootContentLayer;
@@ -290,6 +319,7 @@ private:
     bool m_hasAcceleratedCompositing;
     ChromeClient::CompositingTriggerFlags m_compositingTriggers;
 
+    int m_compositedLayerCount;
     bool m_showDebugBorders;
     bool m_showRepaintCounter;
     bool m_compositingConsultsOverlap;
@@ -299,6 +329,8 @@ private:
     // FIXME: once set, this is never cleared.
     mutable bool m_compositingDependsOnGeometry;
 
+    mutable bool m_compositingNeedsUpdate;
+
     bool m_compositing;
     bool m_compositingLayersNeedRebuild;
     bool m_flushingLayers;
@@ -310,6 +342,10 @@ private:
     OwnPtr<GraphicsLayer> m_clipLayer;
     OwnPtr<GraphicsLayer> m_scrollLayer;
 
+#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
+    HashSet<RenderLayer*> m_scrollingLayers;
+#endif
+
     // Enclosing layer for overflow controls and the clipping layer
     OwnPtr<GraphicsLayer> m_overflowControlsHostLayer;