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

Unified Diff: ui/compositor/dip_util.cc

Issue 467813002: Round the snapped position when checking snapped (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/dip_util.cc
diff --git a/ui/compositor/dip_util.cc b/ui/compositor/dip_util.cc
index bc258fc595c954e9342130a1e660dc88af329019..4db8bcf29a0af466a24557ad1d04f0d8c460f482 100644
--- a/ui/compositor/dip_util.cc
+++ b/ui/compositor/dip_util.cc
@@ -81,7 +81,7 @@ namespace {
void CheckSnapped(float snapped_position) {
const float kEplison = 0.0001f;
- float diff = std::abs(snapped_position - static_cast<int>(snapped_position));
+ float diff = std::abs(snapped_position - gfx::ToRoundedInt(snapped_position));
DCHECK_LT(diff, kEplison);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698