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

Unified Diff: ui/events/ozone/evdev/touch_noise/single_position_touch_noise_filter.cc

Issue 1975533002: Change ui::Event::time_stamp from TimeDelta to TimeTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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
Index: ui/events/ozone/evdev/touch_noise/single_position_touch_noise_filter.cc
diff --git a/ui/events/ozone/evdev/touch_noise/single_position_touch_noise_filter.cc b/ui/events/ozone/evdev/touch_noise/single_position_touch_noise_filter.cc
index 01ebb7675c8f5aeab106c266f1a2299975f0a212..47f6aefe4481781414f23bfa82e9b4031c5ea92e 100644
--- a/ui/events/ozone/evdev/touch_noise/single_position_touch_noise_filter.cc
+++ b/ui/events/ozone/evdev/touch_noise/single_position_touch_noise_filter.cc
@@ -46,10 +46,10 @@ SinglePositionTouchNoiseFilter::SinglePositionTouchNoiseFilter()
void SinglePositionTouchNoiseFilter::Filter(
const std::vector<InProgressTouchEvdev>& touches,
- base::TimeDelta time,
+ base::TimeTicks time,
std::bitset<kNumTouchEvdevSlots>* slots_with_noise) {
// Forget old touches which will no longer be considered for overlap.
- base::TimeDelta touch_cutoff =
+ base::TimeTicks touch_cutoff =
time - base::TimeDelta::FromMilliseconds(kMaxDurationMs);
for (size_t i = tracked_touches_start_; i != tracked_touches_end_;
i = (i + 1) % kNumTrackedTouches) {
@@ -142,7 +142,7 @@ void SinglePositionTouchNoiseFilter::StopTrackingTouch(size_t index) {
void SinglePositionTouchNoiseFilter::TrackTouch(
const InProgressTouchEvdev& touch,
- base::TimeDelta time) {
+ base::TimeTicks time) {
size_t index = tracked_touches_end_;
tracked_touches_end_ = (tracked_touches_end_ + 1) % kNumTrackedTouches;
// If we would reach the start touch index, we cannot track any more touches.

Powered by Google App Engine
This is Rietveld 408576698