Index: cc/layer.cc |
diff --git a/cc/layer.cc b/cc/layer.cc |
index ddc02b4d5141994921251aada18b5e46a48fe75f..3519f144f605e870e8cb58da4056116333aa8142 100644 |
--- a/cc/layer.cc |
+++ b/cc/layer.cc |
@@ -216,12 +216,19 @@ void Layer::setBounds(const gfx::Size& size) |
m_bounds = size; |
+ didUpdateBounds(); |
+ |
if (firstResize) |
setNeedsDisplay(); |
else |
setNeedsCommit(); |
} |
+void Layer::didUpdateBounds() |
+{ |
+ m_drawProperties.content_bounds = bounds(); |
+} |
+ |
Layer* Layer::rootLayer() |
{ |
Layer* layer = this; |
@@ -274,9 +281,15 @@ void Layer::setBackgroundColor(SkColor backgroundColor) |
setNeedsCommit(); |
} |
-gfx::Size Layer::contentBounds() const |
+void Layer::calculateContentsScale( |
+ float idealContentsScale, |
+ float* contentsScaleX, |
+ float* contentsScaleY, |
+ gfx::Size* contentBounds) |
{ |
- return bounds(); |
+ *contentsScaleX = 1; |
+ *contentsScaleY = 1; |
+ *contentBounds = bounds(); |
} |
void Layer::setMasksToBounds(bool masksToBounds) |
@@ -633,16 +646,6 @@ void Layer::setDebugName(const std::string& debugName) |
setNeedsCommit(); |
} |
-float Layer::contentsScaleX() const |
-{ |
- return 1.0; |
-} |
- |
-float Layer::contentsScaleY() const |
-{ |
- return 1.0; |
-} |
- |
void Layer::setRasterScale(float scale) |
{ |
if (m_rasterScale == scale) |