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

Unified Diff: content/renderer/input/main_thread_event_queue.cc

Issue 2822293002: Fix latency info tracking for coalesced events. (Closed)
Patch Set: Fix unittest Created 3 years, 8 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 | content/renderer/input/main_thread_event_queue_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/input/main_thread_event_queue.cc
diff --git a/content/renderer/input/main_thread_event_queue.cc b/content/renderer/input/main_thread_event_queue.cc
index a9875e9b803898053c93819fc1cae9451c0001c4..8c25facf3e7bb16f00ba563cc74abca04a40c9b0 100644
--- a/content/renderer/input/main_thread_event_queue.cc
+++ b/content/renderer/input/main_thread_event_queue.cc
@@ -79,11 +79,11 @@ class QueuedWebInputEvent : public ScopedWebInputEventWithLatencyInfo,
if (!ScopedWebInputEventWithLatencyInfo::CanCoalesceWith(other_event))
return FilterResult::StopIterating;
- // If this event was blocking push the event id to the blocking
- // list before updating the dispatch_type of this event.
- if (dispatch_type_ == DISPATCH_TYPE_BLOCKING) {
+ // If the other event was blocking store its unique touch event id to
+ // ack later.
+ if (other_event.dispatch_type_ == DISPATCH_TYPE_BLOCKING) {
blocking_coalesced_event_ids_.push_back(
- ui::WebInputEventTraits::GetUniqueTouchEventId(event()));
+ ui::WebInputEventTraits::GetUniqueTouchEventId(other_event.event()));
} else {
non_blocking_coalesced_count_++;
}
@@ -91,7 +91,6 @@ class QueuedWebInputEvent : public ScopedWebInputEventWithLatencyInfo,
last_coalesced_timestamp_ = base::TimeTicks::Now();
// The newest event (|other_item|) always wins when updating fields.
- dispatch_type_ = other_event.dispatch_type_;
originally_cancelable_ = other_event.originally_cancelable_;
tdresser 2017/04/18 20:43:39 Is this correct? I would have thought this logic w
return FilterResult::CoalescedEvent;
« no previous file with comments | « no previous file | content/renderer/input/main_thread_event_queue_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698