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

Unified Diff: cc/trees/layer_tree_host_common_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_host_common_perftest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common_unittest.cc
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index f0ca935fe2946455f5b0c9457d454e98e0311852..c1f95d1eab81edb7b3b6703e687078418f1e5b69 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -3692,14 +3692,14 @@ TEST_F(LayerTreeHostCommonScalingTest, LayerTransformsInHighDPI) {
parent->draw_transform());
// Verify results of transformed parent rects
- gfx::RectF parent_bounds(parent->bounds());
+ gfx::RectF parent_bounds(gfx::SizeF(parent->bounds()));
gfx::RectF parent_draw_rect =
MathUtil::MapClippedRect(parent->draw_transform(), parent_bounds);
gfx::RectF parent_screen_space_rect =
MathUtil::MapClippedRect(parent->screen_space_transform(), parent_bounds);
- gfx::RectF expected_parent_draw_rect(parent->bounds());
+ gfx::RectF expected_parent_draw_rect(gfx::SizeF(parent->bounds()));
expected_parent_draw_rect.Scale(device_scale_factor);
EXPECT_FLOAT_RECT_EQ(expected_parent_draw_rect, parent_draw_rect);
EXPECT_FLOAT_RECT_EQ(expected_parent_draw_rect, parent_screen_space_rect);
@@ -3720,7 +3720,7 @@ TEST_F(LayerTreeHostCommonScalingTest, LayerTransformsInHighDPI) {
// Verify results of transformed child and child_empty rects. They should
// match.
- gfx::RectF child_bounds(child->bounds());
+ gfx::RectF child_bounds(gfx::SizeF(child->bounds()));
gfx::RectF child_draw_rect =
MathUtil::MapClippedRect(child->draw_transform(), child_bounds);
@@ -3732,7 +3732,8 @@ TEST_F(LayerTreeHostCommonScalingTest, LayerTransformsInHighDPI) {
gfx::RectF child_empty_screen_space_rect = MathUtil::MapClippedRect(
child_empty->screen_space_transform(), child_bounds);
- gfx::RectF expected_child_draw_rect(child->position(), child->bounds());
+ gfx::RectF expected_child_draw_rect(child->position(),
+ gfx::SizeF(child->bounds()));
expected_child_draw_rect.Scale(device_scale_factor);
EXPECT_FLOAT_RECT_EQ(expected_child_draw_rect, child_draw_rect);
EXPECT_FLOAT_RECT_EQ(expected_child_draw_rect, child_screen_space_rect);
« no previous file with comments | « cc/trees/layer_tree_host_common_perftest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698