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

Unified Diff: cc/layer_tree_host_unittest.cc

Issue 11377068: ui: Make gfx::Size::Scale() mutate the class. Add gfx::ScaleSize() similar to Rect/Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseTOGO Created 8 years, 1 month 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/layer_tree_host_impl_unittest.cc ('k') | cc/page_scale_animation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_unittest.cc
diff --git a/cc/layer_tree_host_unittest.cc b/cc/layer_tree_host_unittest.cc
index b8c92c2e07e47d291f9b7310c9c432c0af27e082..d5d0b39378a19db7e0cd716aac0be3a6b7f7e710 100644
--- a/cc/layer_tree_host_unittest.cc
+++ b/cc/layer_tree_host_unittest.cc
@@ -1339,8 +1339,7 @@ public:
EXPECT_RECT_EQ(gfx::Rect(0, 0, 60, 60), root->renderSurface()->contentRect());
// The content bounds of the child should be scaled.
- gfx::Size childBoundsScaled = child->bounds();
- childBoundsScaled = gfx::ToRoundedSize(childBoundsScaled.Scale(1.5));
+ gfx::Size childBoundsScaled = gfx::ToCeiledSize(gfx::ScaleSize(child->bounds(), 1.5));
EXPECT_EQ(childBoundsScaled, child->contentBounds());
WebTransformationMatrix scaleTransform;
@@ -2187,7 +2186,7 @@ public:
virtual void beginTest() OVERRIDE
{
gfx::Size viewportSize(10, 10);
- gfx::Size deviceViewportSize = gfx::ToCeiledSize(viewportSize.Scale(m_deviceScaleFactor));
+ gfx::Size deviceViewportSize = gfx::ToCeiledSize(gfx::ScaleSize(viewportSize, m_deviceScaleFactor));
m_layerTreeHost->setViewportSize(viewportSize, deviceViewportSize);
m_layerTreeHost->setDeviceScaleFactor(m_deviceScaleFactor);
@@ -2347,7 +2346,7 @@ public:
virtual void beginTest() OVERRIDE
{
gfx::Size viewportSize(10, 10);
- gfx::Size deviceViewportSize = gfx::ToCeiledSize(viewportSize.Scale(m_deviceScaleFactor));
+ gfx::Size deviceViewportSize = gfx::ToCeiledSize(gfx::ScaleSize(viewportSize, m_deviceScaleFactor));
m_layerTreeHost->setViewportSize(viewportSize, deviceViewportSize);
m_layerTreeHost->setDeviceScaleFactor(m_deviceScaleFactor);
« no previous file with comments | « cc/layer_tree_host_impl_unittest.cc ('k') | cc/page_scale_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698