summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-24 11:24:40 +0100
committerBen Murdoch <benm@google.com>2011-06-02 09:53:15 +0100
commit81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch)
tree7a9e5ed86ff429fd347a25153107221543909b19 /Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h
parent94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff)
downloadexternal_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h')
-rw-r--r--Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h41
1 files changed, 15 insertions, 26 deletions
diff --git a/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h b/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h
index 3363518..6f070c2 100644
--- a/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h
+++ b/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h
@@ -35,6 +35,7 @@
#if USE(ACCELERATED_COMPOSITING)
#include "LayerChromium.h"
+#include "PlatformCanvas.h"
#include "TextureManager.h"
namespace WebCore {
@@ -54,43 +55,31 @@ public:
virtual void bindContentsTexture();
virtual void draw();
- virtual bool drawsContent() { return m_owner && m_owner->drawsContent(); }
-
- // Stores values that are shared between instances of this class that are
- // associated with the same LayerRendererChromium (and hence the same GL
- // context).
- class SharedValues {
- public:
- explicit SharedValues(GraphicsContext3D*);
- ~SharedValues();
-
- unsigned contentShaderProgram() const { return m_contentShaderProgram; }
- int shaderSamplerLocation() const { return m_shaderSamplerLocation; }
- int shaderMatrixLocation() const { return m_shaderMatrixLocation; }
- int shaderAlphaLocation() const { return m_shaderAlphaLocation; }
- int initialized() const { return m_initialized; }
-
- private:
- GraphicsContext3D* m_context;
- unsigned m_contentShaderProgram;
- int m_shaderSamplerLocation;
- int m_shaderMatrixLocation;
- int m_shaderAlphaLocation;
- int m_initialized;
- };
+ virtual bool drawsContent() const { return m_owner && m_owner->drawsContent(); }
+
+ typedef ProgramBinding<VertexShaderPosTex, FragmentShaderTexAlpha> Program;
protected:
explicit ContentLayerChromium(GraphicsLayerChromium* owner);
- void updateTextureRect(void* pixels, const IntSize& requiredTextureSize, const IntRect& updateRect);
-
virtual void cleanupResources();
bool requiresClippedUpdateRect() const;
+ void resizeUploadBuffer(const IntSize&);
+
+ virtual const char* layerTypeAsString() const { return "ContentLayer"; }
+ virtual void dumpLayerProperties(TextStream&, int indent) const;
OwnPtr<LayerTexture> m_contentsTexture;
bool m_skipsDraw;
+ // The portion of the upload buffer that has a pending update, in the coordinates of the texture.
+ IntRect m_uploadUpdateRect;
+
+ virtual void updateTextureIfNeeded();
+ void updateTexture(const uint8_t* pixels, const IntSize&);
+
private:
+ PlatformCanvas m_canvas;
IntRect m_visibleRectInLayerCoords;
FloatPoint m_layerCenterInSurfaceCoords;