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

Unified Diff: ash/laser/laser_pointer_controller.cc

Issue 2716223002: ash: Use floating point precision for laser pointer. (Closed)
Patch Set: rebase and fix unit test Created 3 years, 10 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/laser/laser_pointer_controller.h ('k') | ash/laser/laser_pointer_points.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/laser/laser_pointer_controller.cc
diff --git a/ash/laser/laser_pointer_controller.cc b/ash/laser/laser_pointer_controller.cc
index e979549d70281e9299c140dcda8a25e91ac058ed..c027badf08fca09dfb15d694595bdf31898d2e7c 100644
--- a/ash/laser/laser_pointer_controller.cc
+++ b/ash/laser/laser_pointer_controller.cc
@@ -72,20 +72,20 @@ void LaserPointerController::OnTouchEvent(ui::TouchEvent* event) {
if (event->type() == ui::ET_TOUCH_PRESSED &&
!palette_utils::PaletteContainsPointInScreen(event_location)) {
DestroyLaserPointerView();
- UpdateLaserPointerView(current_window, event_location, event);
+ UpdateLaserPointerView(current_window, event->root_location_f(), event);
}
// Do not update laser if it is in the process of fading away.
if (event->type() == ui::ET_TOUCH_MOVED && laser_pointer_view_ &&
!is_fading_away_) {
- UpdateLaserPointerView(current_window, event_location, event);
+ UpdateLaserPointerView(current_window, event->root_location_f(), event);
RestartTimer();
}
if (event->type() == ui::ET_TOUCH_RELEASED && laser_pointer_view_ &&
!is_fading_away_) {
is_fading_away_ = true;
- UpdateLaserPointerView(current_window, event_location, event);
+ UpdateLaserPointerView(current_window, event->root_location_f(), event);
RestartTimer();
}
}
@@ -108,7 +108,7 @@ void LaserPointerController::SwitchTargetRootWindowIfNeeded(
void LaserPointerController::UpdateLaserPointerView(
aura::Window* current_window,
- const gfx::Point& event_location,
+ const gfx::PointF& event_location,
ui::Event* event) {
SwitchTargetRootWindowIfNeeded(current_window);
current_stylus_location_ = event_location;
« no previous file with comments | « ash/laser/laser_pointer_controller.h ('k') | ash/laser/laser_pointer_points.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698