diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/blackberry/LayerRendererSurface.h')
-rw-r--r-- | Source/WebCore/platform/graphics/blackberry/LayerRendererSurface.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/WebCore/platform/graphics/blackberry/LayerRendererSurface.h b/Source/WebCore/platform/graphics/blackberry/LayerRendererSurface.h index 20bcfad6c..cbffa9aff 100644 --- a/Source/WebCore/platform/graphics/blackberry/LayerRendererSurface.h +++ b/Source/WebCore/platform/graphics/blackberry/LayerRendererSurface.h @@ -24,7 +24,7 @@ #include "FloatRect.h" #include "IntRect.h" #include "IntSize.h" -#include "Texture.h" +#include "LayerTexture.h" #include "TransformationMatrix.h" namespace WebCore { @@ -45,22 +45,26 @@ public: FloatRect clipRect() const { return m_clipRect; } void setClipRect(const FloatRect& rect) { m_clipRect = rect; } - void setDrawTransform(const TransformationMatrix& matrix) { m_drawTransform = matrix; } + FloatPoint origin() const { return FloatPoint(m_size.width() / 2.0f, m_size.height() / 2.0f); } + + void setDrawTransform(const TransformationMatrix& matrix, const TransformationMatrix& projectionMatrix) { m_drawTransform = projectionMatrix * matrix; } const TransformationMatrix& drawTransform() const { return m_drawTransform; } - void setReplicaDrawTransform(const TransformationMatrix& matrix) { m_replicaDrawTransform = matrix; } + void setReplicaDrawTransform(const TransformationMatrix& matrix, const TransformationMatrix& projectionMatrix) { m_replicaDrawTransform = projectionMatrix * matrix; } const TransformationMatrix& replicaDrawTransform() const { return m_replicaDrawTransform; } - FloatRect drawRect() const; + // These use normalized device coordinates + FloatRect boundingBox() const; + Vector<FloatPoint, 4> transformedBounds() const; bool ensureTexture(); void releaseTexture(); - Texture* texture() const { return m_texture.get(); } + LayerTexture* texture() const { return m_texture.get(); } float drawOpacity() { return m_opacity; } void setDrawOpacity(float opacity) { m_opacity = opacity; } private: - RefPtr<Texture> m_texture; + RefPtr<LayerTexture> m_texture; FloatRect m_contentRect; FloatRect m_clipRect; |