Index: cc/contents_scaling_layer.cc |
diff --git a/cc/contents_scaling_layer.cc b/cc/contents_scaling_layer.cc |
index 454b6e786e0085b8952c8a7d47243a680f47cbcf..13024542babe6aaeb27a7cb27d9fa7a8bd15bb76 100644 |
--- a/cc/contents_scaling_layer.cc |
+++ b/cc/contents_scaling_layer.cc |
@@ -11,30 +11,24 @@ gfx::Size ContentsScalingLayer::computeContentBoundsForScale(float scaleX, float |
return gfx::ToCeiledSize(gfx::ScaleSize(bounds(), scaleX, scaleY)); |
} |
-ContentsScalingLayer::ContentsScalingLayer() |
- : m_contentsScale(1.0) { |
+ContentsScalingLayer::ContentsScalingLayer() { |
} |
ContentsScalingLayer::~ContentsScalingLayer() { |
} |
-gfx::Size ContentsScalingLayer::contentBounds() const { |
- return computeContentBoundsForScale(contentsScaleX(), contentsScaleY()); |
+void ContentsScalingLayer::updateContentsScale(float ideal_contents_scale) { |
danakj
2012/12/14 20:37:23
What do you think of making this method just retur
enne (OOO)
2012/12/14 22:06:05
Done.
|
+ m_drawProperties.contents_scale_x = ideal_contents_scale; |
+ m_drawProperties.contents_scale_y = ideal_contents_scale; |
+ m_drawProperties.content_bounds = computeContentBoundsForScale( |
+ contentsScaleX(), |
+ contentsScaleY()); |
} |
-float ContentsScalingLayer::contentsScaleX() const { |
- return m_contentsScale; |
-} |
- |
-float ContentsScalingLayer::contentsScaleY() const { |
- return m_contentsScale; |
-} |
- |
-void ContentsScalingLayer::setContentsScale(float contentsScale) { |
- if (m_contentsScale == contentsScale) |
- return; |
- m_contentsScale = contentsScale; |
- setNeedsDisplay(); |
+void ContentsScalingLayer::didUpdateBounds() { |
+ m_drawProperties.content_bounds = computeContentBoundsForScale( |
+ contentsScaleX(), |
+ contentsScaleY()); |
} |
} // namespace cc |