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

Unified Diff: cc/test/layer_test_common.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/playback/display_list_raster_source_unittest.cc ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_test_common.cc
diff --git a/cc/test/layer_test_common.cc b/cc/test/layer_test_common.cc
index 8ed49a2920cc99a98a6e7111c6e6f3d010e44a01..04c6166f1980f467177aeeb1caf33f7f3c1391db 100644
--- a/cc/test/layer_test_common.cc
+++ b/cc/test/layer_test_common.cc
@@ -29,11 +29,9 @@ static bool CanRectFBeSafelyRoundedToRect(const gfx::RectF& r) {
return false;
// Ensure that the values are actually integers.
- if (gfx::ToFlooredPoint(r.origin()) == r.origin() &&
- gfx::ToFlooredSize(r.size()) == r.size())
- return true;
-
- return false;
+ gfx::RectF floored_rect(std::floor(r.x()), std::floor(r.y()),
+ std::floor(r.width()), std::floor(r.height()));
+ return floored_rect == r;
}
void LayerTestCommon::VerifyQuadsExactlyCoverRect(const QuadList& quads,
« no previous file with comments | « cc/playback/display_list_raster_source_unittest.cc ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698