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

Unified Diff: ui/compositor/dip_util.cc

Issue 2771663004: Relax the eplison to check snapping (Closed)
Patch Set: Created 3 years, 9 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 f7290e05c496ca5a3752f94df6eb27a797cb4609..900ce710c6ebfdb1b974ba358818bbb0baf45656 100644
--- a/ui/compositor/dip_util.cc
+++ b/ui/compositor/dip_util.cc
@@ -66,7 +66,7 @@ gfx::Rect ConvertRectToPixel(const Layer* layer,
namespace {
void CheckSnapped(float snapped_position) {
- const float kEplison = 0.0001f;
+ const float kEplison = 0.0002f;
servolk 2017/03/23 21:49:00 Nit: fix the typo while you are at it kEplison ->
servolk 2017/03/23 21:50:23 Also, I'm pretty sure 0.0002f is not enough. I hav
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