summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/chromium/ContentLayerChromium.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/chromium/ContentLayerChromium.h')
-rw-r--r--WebCore/platform/graphics/chromium/ContentLayerChromium.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/WebCore/platform/graphics/chromium/ContentLayerChromium.h b/WebCore/platform/graphics/chromium/ContentLayerChromium.h
index 32c2c49..dc1630b 100644
--- a/WebCore/platform/graphics/chromium/ContentLayerChromium.h
+++ b/WebCore/platform/graphics/chromium/ContentLayerChromium.h
@@ -35,9 +35,12 @@
#if USE(ACCELERATED_COMPOSITING)
#include "LayerChromium.h"
+#include "TextureManager.h"
namespace WebCore {
+class LayerTexture;
+
// A Layer that requires a GraphicsContext to render its contents.
class ContentLayerChromium : public LayerChromium {
friend class LayerRendererChromium;
@@ -46,7 +49,7 @@ public:
virtual ~ContentLayerChromium();
- virtual void updateContents();
+ virtual void updateContentsIfDirty();
virtual void draw();
virtual bool drawsContent() { return m_owner && m_owner->drawsContent(); }
@@ -74,22 +77,20 @@ public:
};
protected:
- ContentLayerChromium(GraphicsLayerChromium* owner);
+ explicit ContentLayerChromium(GraphicsLayerChromium* owner);
- void updateTextureRect(void* pixels, const IntSize& bitmapSize, const IntSize& requiredTextureSize,
- const IntRect& updateRect, unsigned textureId);
+ void updateTextureRect(void* pixels, const IntSize& requiredTextureSize, const IntRect& updateRect);
virtual void cleanupResources();
bool requiresClippedUpdateRect() const;
- unsigned m_contentsTexture;
- IntSize m_allocatedTextureSize;
+ OwnPtr<LayerTexture> m_contentsTexture;
bool m_skipsDraw;
private:
- void calculateClippedUpdateRect(IntRect& dirtyRect, IntRect& drawRect) const;
- IntRect m_largeLayerDrawRect;
- IntRect m_largeLayerDirtyRect;
+
+ IntRect m_visibleRectInLayerCoords;
+ FloatPoint m_layerCenterInSurfaceCoords;
};
}