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

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: 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
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 34d26d5f3b69f736bab4df04f341244a7875d1c1..5f60c21d3273a236e791e3713e6b1fc247a399ac 100644
--- a/cc/trees/layer_tree_impl_unittest.cc
+++ b/cc/trees/layer_tree_impl_unittest.cc
@@ -116,7 +116,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());
@@ -126,7 +126,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());
@@ -1493,8 +1493,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);
@@ -1952,8 +1952,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);

Powered by Google App Engine
This is Rietveld 408576698