diff options
Diffstat (limited to 'Source/WebCore/rendering/RenderLayerCompositor.h')
-rw-r--r-- | Source/WebCore/rendering/RenderLayerCompositor.h | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/Source/WebCore/rendering/RenderLayerCompositor.h b/Source/WebCore/rendering/RenderLayerCompositor.h index 386119947..2591c882a 100644 --- a/Source/WebCore/rendering/RenderLayerCompositor.h +++ b/Source/WebCore/rendering/RenderLayerCompositor.h @@ -28,12 +28,14 @@ #include "ChromeClient.h" #include "Frame.h" +#include "GraphicsLayerUpdater.h" #include "RenderLayer.h" #include "RenderLayerBacking.h" namespace WebCore { class GraphicsLayer; +class GraphicsLayerUpdater; class RenderEmbeddedObject; class RenderPart; class ScrollingCoordinator; @@ -55,7 +57,7 @@ enum CompositingUpdateType { // // There is one RenderLayerCompositor per RenderView. -class RenderLayerCompositor : public GraphicsLayerClient { +class RenderLayerCompositor : public GraphicsLayerClient, public GraphicsLayerUpdaterClient { WTF_MAKE_FAST_ALLOCATED; public: RenderLayerCompositor(RenderView*); @@ -203,15 +205,18 @@ public: bool compositorShowDebugBorders() const { return m_showDebugBorders; } bool compositorShowRepaintCounter() const { return m_showRepaintCounter; } - virtual float deviceScaleFactor() const; - virtual float pageScaleFactor() const; - virtual void didCommitChangesForLayer(const GraphicsLayer*) const; + virtual float deviceScaleFactor() const OVERRIDE; + virtual float pageScaleFactor() const OVERRIDE; + virtual void didCommitChangesForLayer(const GraphicsLayer*) const OVERRIDE; + virtual void notifyFlushBeforeDisplayRefresh(const GraphicsLayer*) OVERRIDE; bool keepLayersPixelAligned() const; bool acceleratedDrawingEnabled() const { return m_acceleratedDrawingEnabled; } void deviceOrPageScaleFactorChanged(); + void windowScreenDidChange(PlatformDisplayID); + GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizontalScrollbar.get(); } GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVerticalScrollbar.get(); } GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner.get(); } @@ -224,13 +229,16 @@ public: private: class OverlapMap; - // GraphicsLayerClient Implementation - virtual void notifyAnimationStarted(const GraphicsLayer*, double) { } - virtual void notifyFlushRequired(const GraphicsLayer*) { scheduleLayerFlush(); } - virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect&); + // GraphicsLayerClient implementation + virtual void notifyAnimationStarted(const GraphicsLayer*, double) OVERRIDE { } + virtual void notifyFlushRequired(const GraphicsLayer*) OVERRIDE { scheduleLayerFlush(); } + virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect&) OVERRIDE; - virtual bool showDebugBorders(const GraphicsLayer*) const; - virtual bool showRepaintCounter(const GraphicsLayer*) const; + virtual bool showDebugBorders(const GraphicsLayer*) const OVERRIDE; + virtual bool showRepaintCounter(const GraphicsLayer*) const OVERRIDE; + + // GraphicsLayerUpdaterClient implementation + virtual void flushLayers(GraphicsLayerUpdater*) OVERRIDE; // Whether the given RL needs a compositing layer. bool needsToBeComposited(const RenderLayer*) const; @@ -283,6 +291,8 @@ private: void notifyIFramesOfCompositingChange(); bool isFlushingLayers() const { return m_flushingLayers; } + + Page* page() const; GraphicsLayerFactory* graphicsLayerFactory() const; ScrollingCoordinator* scrollingCoordinator() const; @@ -356,6 +366,8 @@ private: OwnPtr<GraphicsLayer> m_contentShadowLayer; #endif + OwnPtr<GraphicsLayerUpdater> m_layerUpdater; // Updates tiled layer visible area periodically while animations are running. + #if !LOG_DISABLED int m_rootLayerUpdateCount; int m_obligateCompositedLayerCount; // count of layer that have to be composited. |