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

Unified Diff: ash/touch/touch_uma.cc

Issue 1417023002: Remove some implicit Point to PointF conversions, add helpers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-views: extrachange Created 5 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 | « no previous file | chrome/browser/ui/views/tabs/window_finder_x11.cc » ('j') | ui/gfx/geometry/point.cc » ('J')
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 b314e2dcecd28ed7724dadfb352ad8a11dd1d2e3..311fadebd46f264ce75560dc9d2647babcc1af14 100644
--- a/ash/touch/touch_uma.cc
+++ b/ash/touch/touch_uma.cc
@@ -108,8 +108,8 @@ void TouchUMA::RecordTouchEvent(aura::Window* target,
// Prefer raw event location (when available) over calibrated location.
if (event.HasNativeEvent()) {
position = ui::EventLocationFromNative(event.native_event());
- position = gfx::ToFlooredPoint(
- gfx::ScalePoint(position, 1. / target->layer()->device_scale_factor()));
+ position = gfx::ScaleToFlooredPoint(
+ position, 1.f / target->layer()->device_scale_factor());
}
position.set_x(std::min(bounds.width() - 1, std::max(0, position.x())));
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/window_finder_x11.cc » ('j') | ui/gfx/geometry/point.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698