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

Unified Diff: cc/trees/layer_tree_impl_unittest.cc

Issue 1357423009: gfx: Make conversions from Size to SizeF be explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sizefconvert-gfx: . Created 5 years, 3 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/trees/layer_tree_impl.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl_unittest.cc
diff --git a/cc/trees/layer_tree_impl_unittest.cc b/cc/trees/layer_tree_impl_unittest.cc
index e00e7c8c6bae5dc68973c994e6322b11f5678eea..acd9fcb343a116b830dc9da9cca853e49b13d995 100644
--- a/cc/trees/layer_tree_impl_unittest.cc
+++ b/cc/trees/layer_tree_impl_unittest.cc
@@ -118,7 +118,7 @@ TEST_F(LayerTreeImplTest, UpdateViewportAndHitTest) {
host_impl->active_tree()->SetRootLayer(root.Pass());
host_impl->UpdateNumChildrenAndDrawPropertiesForActiveTree();
EXPECT_EQ(
- gfx::RectF(bounds),
+ gfx::RectF(gfx::SizeF(bounds)),
host_impl->active_tree()->property_trees()->clip_tree.ViewportClip());
EXPECT_EQ(gfx::Rect(bounds),
host_impl->RootLayer()->visible_rect_from_property_trees());
@@ -128,7 +128,7 @@ TEST_F(LayerTreeImplTest, UpdateViewportAndHitTest) {
gfx::Point test_point(51, 51);
host_impl->active_tree()->FindLayerThatIsHitByPoint(test_point);
EXPECT_EQ(
- gfx::RectF(new_bounds),
+ gfx::RectF(gfx::SizeF(new_bounds)),
host_impl->active_tree()->property_trees()->clip_tree.ViewportClip());
EXPECT_EQ(gfx::Rect(new_bounds),
host_impl->RootLayer()->visible_rect_from_property_trees());
@@ -1495,8 +1495,8 @@ TEST_F(LayerTreeImplTest,
float device_scale_factor = 3.f;
float page_scale_factor = 5.f;
- gfx::Size scaled_bounds_for_root = gfx::ToCeiledSize(
- gfx::ScaleSize(root->bounds(), device_scale_factor * page_scale_factor));
+ gfx::Size scaled_bounds_for_root = gfx::ScaleToCeiledSize(
+ root->bounds(), device_scale_factor * page_scale_factor);
host_impl().SetViewportSize(scaled_bounds_for_root);
host_impl().SetDeviceScaleFactor(device_scale_factor);
@@ -1954,8 +1954,8 @@ TEST_F(LayerTreeImplTest, SelectionBoundsForScaledLayers) {
float device_scale_factor = 3.f;
float page_scale_factor = 5.f;
- gfx::Size scaled_bounds_for_root = gfx::ToCeiledSize(
- gfx::ScaleSize(root->bounds(), device_scale_factor * page_scale_factor));
+ gfx::Size scaled_bounds_for_root = gfx::ScaleToCeiledSize(
+ root->bounds(), device_scale_factor * page_scale_factor);
host_impl().SetViewportSize(scaled_bounds_for_root);
host_impl().SetDeviceScaleFactor(device_scale_factor);
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698