Index: cc/layer.cc |
diff --git a/cc/layer.cc b/cc/layer.cc |
index ddc02b4d5141994921251aada18b5e46a48fe75f..5c4ba531051f4f1308f80ef41e3576c570533fa2 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,11 @@ void Layer::setBackgroundColor(SkColor backgroundColor) |
setNeedsCommit(); |
} |
-gfx::Size Layer::contentBounds() const |
+void Layer::updateContentsScale(float ideal_contents_scale) |
{ |
- return bounds(); |
+ m_drawProperties.contents_scale_x = 1; |
+ m_drawProperties.contents_scale_y = 1; |
+ m_drawProperties.content_bounds = bounds(); |
} |
void Layer::setMasksToBounds(bool masksToBounds) |
@@ -633,16 +642,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) |