diff options
Diffstat (limited to 'WebCore/platform/graphics/chromium/LayerChromium.h')
-rw-r--r-- | WebCore/platform/graphics/chromium/LayerChromium.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/WebCore/platform/graphics/chromium/LayerChromium.h b/WebCore/platform/graphics/chromium/LayerChromium.h index 5b93f77..1b807a5 100644 --- a/WebCore/platform/graphics/chromium/LayerChromium.h +++ b/WebCore/platform/graphics/chromium/LayerChromium.h @@ -151,6 +151,7 @@ public: bool geometryFlipped() const { return m_geometryFlipped; } void updateContents(); + bool contentsDirty() { return m_contentsDirty; } void setContents(NativeImagePtr contents); NativeImagePtr contents() const { return m_contents; } @@ -158,9 +159,13 @@ public: skia::PlatformCanvas* platformCanvas() { return m_canvas.get(); } GraphicsContext* graphicsContext() { return m_graphicsContext.get(); } - void setBackingStoreRect(const IntSize&); + void setBackingStoreSize(const IntSize&); - void drawDebugBorder(); + bool drawsContent() { return m_owner && m_owner->drawsContent(); } + + // This method should be called every time the status drawsContent() + // status changes to ensure that the internal graphics context is in sync. + void drawsContentUpdated(); private: LayerChromium(LayerType, GraphicsLayerChromium* owner); @@ -184,7 +189,8 @@ private: // Re-creates the canvas and graphics context. This method // must be called every time the layer is resized. Only layers - void updateGraphicsContext(const IntSize&); + // that do drawing and the root layer get a context. + void updateGraphicsContext(); Vector<RefPtr<LayerChromium> > m_sublayers; LayerChromium* m_superlayer; @@ -195,11 +201,12 @@ private: OwnPtr<PlatformContextSkia> m_skiaContext; OwnPtr<GraphicsContext> m_graphicsContext; #endif + bool m_hasContext; LayerType m_layerType; IntSize m_bounds; - IntSize m_backingStoreRect; + IntSize m_backingStoreSize; FloatPoint m_position; FloatPoint m_anchorPoint; Color m_backgroundColor; @@ -223,6 +230,8 @@ private: bool m_geometryFlipped; bool m_needsDisplayOnBoundsChange; + bool m_contentsDirty; + ContentsGravityType m_contentsGravity; NativeImagePtr m_contents; String m_name; |