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

Unified Diff: ui/events/ozone/evdev/touch_event_converter_evdev.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_event_converter_evdev.cc
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev.cc b/ui/events/ozone/evdev/touch_event_converter_evdev.cc
index 513adf99e6d96ab041588568112da73e24f5e859..55d3b59898d6880d6439a90e9308f6798a3bc026 100644
--- a/ui/events/ozone/evdev/touch_event_converter_evdev.cc
+++ b/ui/events/ozone/evdev/touch_event_converter_evdev.cc
@@ -372,7 +372,7 @@ void TouchEventConverterEvdev::ProcessAbs(const input_event& input) {
void TouchEventConverterEvdev::ProcessSyn(const input_event& input) {
switch (input.code) {
case SYN_REPORT:
- ReportEvents(EventConverterEvdev::TimeDeltaFromInputEvent(input));
+ ReportEvents(EventConverterEvdev::TimeTicksFromInputEvent(input));
break;
case SYN_DROPPED:
// Some buffer has overrun. We ignore all events up to and
@@ -402,7 +402,7 @@ EventType TouchEventConverterEvdev::GetEventTypeForTouch(
void TouchEventConverterEvdev::ReportEvent(const InProgressTouchEvdev& event,
EventType event_type,
- const base::TimeDelta& timestamp) {
+ base::TimeTicks timestamp) {
PointerDetails details(GetPointerTypeFromEvent(event), event.radius_x,
event.radius_y, event.pressure,
/* tilt_x */ 0.0f,
@@ -412,14 +412,14 @@ void TouchEventConverterEvdev::ReportEvent(const InProgressTouchEvdev& event,
gfx::PointF(event.x, event.y), details, timestamp));
}
-void TouchEventConverterEvdev::ReportEvents(base::TimeDelta delta) {
+void TouchEventConverterEvdev::ReportEvents(base::TimeTicks timestamp) {
if (dropped_events_) {
Reinitialize();
dropped_events_ = false;
}
if (touch_noise_finder_)
- touch_noise_finder_->HandleTouches(events_, delta);
+ touch_noise_finder_->HandleTouches(events_, timestamp);
for (size_t i = 0; i < events_.size(); i++) {
InProgressTouchEvdev* event = &events_[i];
@@ -431,7 +431,7 @@ void TouchEventConverterEvdev::ReportEvents(base::TimeDelta delta) {
event->cancelled = true;
if (event_type != ET_UNKNOWN)
- ReportEvent(*event, event_type, delta);
+ ReportEvent(*event, event_type, timestamp);
event->was_touching = event->touching;
event->altered = false;
« no previous file with comments | « ui/events/ozone/evdev/touch_event_converter_evdev.h ('k') | ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698