Fix the issue that accelerated overflow scrolling become invisible
[framework/web/webkit-efl.git] / Source / WebKit2 / WebProcess / WebPage / LayerTreeCoordinator / WebGraphicsLayer.h
index 8fa50e1..4c2cc7f 100755 (executable)
 #include <WebCore/RunLoop.h>
 #include <wtf/text/StringHash.h>
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-#include "../WebPage/cairo/RecordingSurfaceSetCairo.h"
-#endif
-
 #if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
 #include <wtf/threads/BinarySemaphore.h>
 #endif
 
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
+#include "efl/tizen/TiledBackingStoreRemoteTileTizen.h"
+#endif
+
 #if USE(UI_SIDE_COMPOSITING)
 namespace WebCore {
 class WebGraphicsLayer;
@@ -56,9 +56,6 @@ class TileCutOffInfo;
 }
 
 namespace WebKit {
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-class RecordingSurfaceSet;
-#endif
 
 class WebGraphicsLayerClient {
 public:
@@ -90,12 +87,6 @@ public:
     virtual void syncFixedLayers() = 0;
     virtual PassOwnPtr<WebCore::GraphicsContext> beginContentUpdate(const WebCore::IntSize&, ShareableBitmap::Flags, ShareableSurface::Handle&, WebCore::IntPoint&) = 0;
 
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    virtual bool recordingSurfaceSetEnableGet() = 0;
-    virtual bool recordingSurfaceSetLoadStartGet() = 0;
-    virtual bool recordingSurfaceSetLoadFinishedGet() = 0;
-#endif
-
 #if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
     virtual bool isGLAccelerationMode() const = 0;
 #endif
@@ -133,6 +124,7 @@ public:
     void setOpacity(float);
     void setContentsRect(const IntRect&);
     void setContentsToImage(Image*);
+    void setContentsToBackgroundColor(const Color&);
     void setContentsToCanvas(PlatformLayer*);
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
     void setContentsToMedia(PlatformLayer*);
@@ -188,9 +180,6 @@ public:
 #endif
     void syncCanvas();
     void ensureImageBackingStore();
-#if ENABLE(TIZEN_ACCELERATED_COMPOSITING_PLUGIN_LAYER_EFL)
-    void ensureMediaPlatformSurfaceID();
-#endif
 
     void adjustVisibleRect();
     bool isReadyForTileBufferSwap() const;
@@ -207,21 +196,20 @@ public:
     void freePlatformSurface(int platformSurfaceID);
     void removePlatformSurface(int platformSurfaceID);
     bool swapPlatformSurfaces();
+#else
+    void markCanvasPlatformLayerNeedsUpdate() { m_canvasNeedsDisplay = true; }
+#endif
+#if ENABLE(TIZEN_ACCELERATED_2D_CANVAS_EFL)
+    void flushPlatformSurfaces();
 #endif
     int contentType() { return m_layerInfo.contentType; }
 #endif
 
 #if ENABLE(TIZEN_WEBKIT2_DEBUG_BORDERS)
-    virtual bool drawTileInfo() const { return showDebugBorders(); }
-#endif
-
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    virtual IntRect dirtyUnionRect();
-    void setNonCompositedLayer(bool);
+    virtual bool drawTileInfo() const;
 #endif
 
 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
-    void setVisibleRect(const IntRect& rect) { m_visibleRect = rect; }
     void setIsOverflow(const bool b);
     bool isOverflow() const { return m_isOverflow; }
 #endif
@@ -235,6 +223,12 @@ public:
     Vector<TileCutOffInfo> getCutOffInfoList();
     void setCutOffDistance(double distance);
 #endif
+#if ENABLE(TIZEN_WEBKIT2_MEMORY_SAVING_MODE)
+    bool memorySavingModeEnabled();
+#endif
+#if ENABLE(TIZEN_CSS_OVERFLOW_CLIPPING_BACKING_STORE)
+    FloatRect clippingBounds();
+#endif
 
 private:
     virtual void willBeDestroyed();
@@ -244,6 +238,7 @@ private:
     GraphicsLayer* m_maskTarget;
     FloatRect m_needsDisplayRect;
     GraphicsLayerTransform m_layerTransform;
+    GraphicsLayerTransform m_layerSettledTransform;
     bool m_inUpdateMode : 1;
     bool m_shouldUpdateVisibleRect: 1;
     bool m_shouldSyncLayerState: 1;
@@ -251,6 +246,7 @@ private:
     bool m_shouldSyncFilters: 1;
     bool m_shouldSyncAnimations: 1;
     bool m_fixedToViewport : 1;
+    bool m_movingVisibleRect : 1;
 #if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
     bool m_isOverflow : 1;
 #endif
@@ -273,11 +269,8 @@ private:
 
     void createBackingStore();
 
+    bool selfOrAncestorHasActiveTransformAnimation();
     bool selfOrAncestorHaveNonAffineTransforms();
-#if ENABLE(TIZEN_CUTOFF_TILES_OVER_MEMORY_LIMIT)
-    bool selfOrAncestorHasActiveTransformAnimation() const;
-#endif
-    bool shouldUseTiledBackingStore();
     void adjustContentsScale();
     void computeTransformedVisibleRect();
     void syncLayerParameters();
@@ -294,41 +287,10 @@ private:
     OwnPtr<WebCore::TiledBackingStore> m_mainBackingStore;
     OwnPtr<WebCore::TiledBackingStore> m_previousBackingStore;
     float m_contentsScale;
-
-#if ENABLE(TIZEN_RECORDING_SURFACE_SET)
-    bool recordingSurfaceSetEnableGet();
-    bool recordingSurfaceSetLoadStartGet();
-    bool recordingSurfaceSetLoadFinishedGet();
-    void recordingSurfaceSetRecord();
-    void recordingSurfaceSetReplay(WebCore::GraphicsContext&, const WebCore::IntRect&);
-    void recordingSurfaceSetRebuild(WebKit::RecordingSurfaceSet*, float scale);
-    void setDirtyUnionRect(const IntRect& rect);
-    void uniteDirtyUnionRect(const IntRect& rect);
-    void setDirtyRect(const IntRect& rect);
-    void dirtyRectInvalidate();
-
-    enum RecordingSurfaceSetStatus {
-        RecordingSurfaceSetInit,
-        RecordingSurfaceSetComplete
-    };
-
-    bool m_nonCompositedLayer;
-    IntRect m_dirtyUnionRect;
-    bool m_changedZoomSet;
-    bool m_recordingSurfaceSetIsReplaying;
-    RecordingSurfaceSetStatus m_recordingSurfaceSetStatus;
-    WebKit::RecordingSurfaceSet* m_recordingSurfaceSet;
-    Vector<WebCore::IntRect> m_dirtyRects;
-
-#if ENABLE(TIZEN_RECORDING_SURFACE_PAINT_THREAD)
-    void updateTileBuffers();
-    void scheduleUpdateTileBuffersAsync();
-    WTF::BinarySemaphore m_waitForSyncSemaphore;
-#endif
-#endif
-#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
-    IntRect m_visibleRect;
+#if ENABLE(TIZEN_USE_FIXED_SCALE_ANIMATION)
+    float m_fixedAnimationScale;
 #endif
+
     PlatformLayer* m_canvasPlatformLayer;
     Timer<WebGraphicsLayer> m_animationStartedTimer;
     GraphicsLayerAnimations m_animations;