Index: cc/test/tiled_layer_test_common.cc |
diff --git a/cc/test/tiled_layer_test_common.cc b/cc/test/tiled_layer_test_common.cc |
index 80106383c051ff6ea28e5997f04f7bdf083630d8..f891d36d8bf5d1caf4088a4448dd95ad06681793 100644 |
--- a/cc/test/tiled_layer_test_common.cc |
+++ b/cc/test/tiled_layer_test_common.cc |
@@ -134,29 +134,40 @@ cc::PrioritizedResourceManager* FakeTiledLayer::resourceManager() const |
return m_resourceManager; |
} |
-cc::LayerUpdater* FakeTiledLayer::updater() const |
+void FakeTiledLayer::updateContentsScale(float idealContentsScale) |
{ |
- return m_fakeUpdater.get(); |
+ calculateContentsScale( |
+ idealContentsScale, |
+ &drawProperties().contents_scale_x, |
+ &drawProperties().contents_scale_y, |
+ &drawProperties().content_bounds); |
} |
-gfx::Size FakeTiledLayerWithScaledBounds::contentBounds() const |
+cc::LayerUpdater* FakeTiledLayer::updater() const |
{ |
- return m_forcedContentBounds; |
+ return m_fakeUpdater.get(); |
} |
-float FakeTiledLayerWithScaledBounds::contentsScaleX() const |
+void FakeTiledLayerWithScaledBounds::setContentBounds(const gfx::Size& contentBounds) |
{ |
- return static_cast<float>(m_forcedContentBounds.width()) / bounds().width(); |
+ m_forcedContentBounds = contentBounds; |
+ drawProperties().content_bounds = m_forcedContentBounds; |
} |
-float FakeTiledLayerWithScaledBounds::contentsScaleY() const |
+void FakeTiledLayerWithScaledBounds::calculateContentsScale( |
+ float idealContentsScale, |
+ float* contentsScaleX, |
+ float* contentsScaleY, |
+ gfx::Size* contentBounds) |
{ |
- return static_cast<float>(m_forcedContentBounds.height()) / bounds().height(); |
+ *contentsScaleX = static_cast<float>(m_forcedContentBounds.width()) / bounds().width(); |
+ *contentsScaleY = static_cast<float>(m_forcedContentBounds.height()) / bounds().height(); |
+ *contentBounds = m_forcedContentBounds; |
} |
-void FakeTiledLayerWithScaledBounds::setContentsScale(float) |
+void FakeTiledLayerWithScaledBounds::didUpdateBounds() |
{ |
- NOTREACHED(); |
+ drawProperties().content_bounds = m_forcedContentBounds; |
} |
} // namespace |