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

Unified Diff: ash/laser/laser_pointer_controller.cc

Issue 2723653003: ash: Avoid unnecessary laser pointer updates. (Closed)
Patch Set: 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 | « no previous file | no next file » | 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 c027badf08fca09dfb15d694595bdf31898d2e7c..8cf1bd7c7de915bd48e1fea10f0399cbed825a5f 100644
--- a/ash/laser/laser_pointer_controller.cc
+++ b/ash/laser/laser_pointer_controller.cc
@@ -20,7 +20,7 @@ const int kPointLifeDurationMs = 200;
// When no move events are being received we add a new point every
// |kAddStationaryPointsDelayMs| so that points older than
// |kPointLifeDurationMs| can get removed.
-const int kAddStationaryPointsDelayMs = 5;
+const int kAddStationaryPointsDelayMs = 16;
jdufault 2017/02/28 20:25:08 Please document why 16ms is the minimum.
reveman 2017/03/02 14:42:39 Done. Also added a TODO about using the real VSYNC
} // namespace
@@ -128,8 +128,7 @@ void LaserPointerController::DestroyLaserPointerView() {
void LaserPointerController::RestartTimer() {
stationary_timer_repeat_count_ = 0;
- if (!stationary_timer_->IsRunning())
- stationary_timer_->Reset();
+ stationary_timer_->Reset();
}
void LaserPointerController::AddStationaryPoint() {
« 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