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

Unified Diff: ash/touch/touch_uma.cc

Issue 11081007: Remove implicit flooring Scale() method from Point and Size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « ash/display/multi_display_manager.cc ('k') | chrome/browser/chromeos/status/network_menu_icon.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/touch/touch_uma.cc
diff --git a/ash/touch/touch_uma.cc b/ash/touch/touch_uma.cc
index a6a536fe5bdcddfaf47c2a94085d3e357612cc4a..4312ffd70689b82c24a50d71420ea36353fd6f1c 100644
--- a/ash/touch/touch_uma.cc
+++ b/ash/touch/touch_uma.cc
@@ -11,6 +11,7 @@
#include "ui/aura/window.h"
#include "ui/aura/window_property.h"
#include "ui/base/events/event.h"
+#include "ui/gfx/point_conversions.h"
#if defined(USE_XI2_MT)
#include <X11/extensions/XInput2.h>
@@ -312,7 +313,8 @@ void TouchUMA::RecordTouchEvent(aura::Window* target,
#else
position = ui::EventLocationFromNative(event.native_event());
#endif
- position = position.Scale(1. / target->layer()->device_scale_factor());
+ position = gfx::ToFlooredPoint(
+ position.Scale(1. / target->layer()->device_scale_factor()));
}
position.set_x(std::min(bounds.width() - 1, std::max(0, position.x())));
« no previous file with comments | « ash/display/multi_display_manager.cc ('k') | chrome/browser/chromeos/status/network_menu_icon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698