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

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: 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/test/layer_test_common.cc
diff --git a/cc/test/layer_test_common.cc b/cc/test/layer_test_common.cc
index 7cb97cd51bc41e78f0d754886d67204728239cca..63eb3eaa277ac13136397ee3e602aebc46f86c0d 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,

Powered by Google App Engine
This is Rietveld 408576698