Index: cc/layer.h |
diff --git a/cc/layer.h b/cc/layer.h |
index 2be73c220a07f1db8c00243d3a95d9d446faa5cf..88fe1aac1613040cfd98fc830ff58f62b4c2dcc8 100644 |
--- a/cc/layer.h |
+++ b/cc/layer.h |
@@ -84,8 +84,9 @@ public: |
// A layer's bounds are in logical, non-page-scaled pixels (however, the |
// root layer's bounds are in physical pixels). |
void setBounds(const gfx::Size&); |
+ // TODO(enne): remove this function: http://crbug.com/166023 |
+ virtual void didUpdateBounds(); |
const gfx::Size& bounds() const { return m_bounds; } |
- virtual gfx::Size contentBounds() const; |
void setMasksToBounds(bool); |
bool masksToBounds() const { return m_masksToBounds; } |
@@ -226,9 +227,10 @@ public: |
// The contentsScale converts from logical, non-page-scaled pixels to target pixels. |
// The contentsScale is 1 for the root layer as it is already in physical pixels. |
// By default contentsScale is forced to be 1 except for subclasses of ContentsScalingLayer. |
- virtual float contentsScaleX() const; |
- virtual float contentsScaleY() const; |
- virtual void setContentsScale(float contentsScale) { } |
+ float contentsScaleX() const { return m_drawProperties.contents_scale_x; } |
+ float contentsScaleY() const { return m_drawProperties.contents_scale_y; } |
+ gfx::Size contentBounds() const { return m_drawProperties.content_bounds; } |
+ virtual void updateContentsScale(float ideal_contents_scale); |
// The scale at which contents should be rastered, to match the scale at |
// which they will drawn to the screen. This scale is a component of the |
@@ -310,6 +312,8 @@ protected: |
virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl* treeImpl); |
int m_layerId; |
+ DrawProperties<Layer, RenderSurface> m_drawProperties; |
danakj
2012/12/14 20:37:23
This can stay private I think.
If the subclass do
|
+ |
private: |
friend class base::RefCounted<Layer>; |
@@ -382,8 +386,6 @@ private: |
WebKit::WebAnimationDelegate* m_layerAnimationDelegate; |
WebKit::WebLayerScrollClient* m_layerScrollClient; |
- |
- DrawProperties<Layer, RenderSurface> m_drawProperties; |
}; |
void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped_refptr<Layer> >::iterator, void*); |