Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3938)

Unified Diff: cc/test/tiled_layer_test_common.cc

Issue 11276060: Pass accurate contentsScale to LayerImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/tiled_layer_test_common.h ('k') | cc/tiled_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 97576173985040d436e83460ac3503c030aeb3fa..56b304955ee88fa8ab5eab4db8e60987f358ee9c 100644
--- a/cc/test/tiled_layer_test_common.cc
+++ b/cc/test/tiled_layer_test_common.cc
@@ -139,4 +139,19 @@ cc::IntSize FakeTiledLayerWithScaledBounds::contentBounds() const
return m_forcedContentBounds;
}
+float FakeTiledLayerWithScaledBounds::contentsScaleX() const
+{
+ return static_cast<float>(m_forcedContentBounds.width()) / bounds().width();
+}
+
+float FakeTiledLayerWithScaledBounds::contentsScaleY() const
+{
+ return static_cast<float>(m_forcedContentBounds.height()) / bounds().height();
+}
+
+void FakeTiledLayerWithScaledBounds::setContentsScale(float)
+{
+ NOTREACHED();
+}
+
} // namespace
« no previous file with comments | « cc/test/tiled_layer_test_common.h ('k') | cc/tiled_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698