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

Side by Side Diff: content/renderer/input/main_thread_event_queue.cc

Issue 2479123003: WIP Add getCoalescedEvents API using vector of WebInputEvents (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/input/main_thread_event_queue.h" 5 #include "content/renderer/input/main_thread_event_queue.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "content/common/input/event_with_latency_info.h" 8 #include "content/common/input/event_with_latency_info.h"
9 #include "content/common/input_messages.h" 9 #include "content/common/input_messages.h"
10 10
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 kTenSeconds, 50); 165 kTenSeconds, 50);
166 } 166 }
167 167
168 InputEventDispatchType dispatch_type = in_flight_event_->dispatchType(); 168 InputEventDispatchType dispatch_type = in_flight_event_->dispatchType();
169 if (!in_flight_event_->coalescedEventIds().empty() && 169 if (!in_flight_event_->coalescedEventIds().empty() &&
170 dispatch_type == DISPATCH_TYPE_BLOCKING) { 170 dispatch_type == DISPATCH_TYPE_BLOCKING) {
171 dispatch_type = DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN; 171 dispatch_type = DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN;
172 } 172 }
173 173
174 client_->HandleEventOnMainThread(routing_id_, &in_flight_event_->event(), 174 client_->HandleEventOnMainThread(routing_id_, &in_flight_event_->event(),
175 in_flight_event_->coalescedEvents(),
175 in_flight_event_->latencyInfo(), 176 in_flight_event_->latencyInfo(),
176 dispatch_type); 177 dispatch_type);
177 } 178 }
178 179
179 in_flight_event_.reset(); 180 in_flight_event_.reset();
180 } 181 }
181 182
182 void MainThreadEventQueue::PossiblyScheduleMainFrame() { 183 void MainThreadEventQueue::PossiblyScheduleMainFrame() {
183 if (IsRafAlignedInputDisabled()) 184 if (IsRafAlignedInputDisabled())
184 return; 185 return;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 // additional frame. 304 // additional frame.
304 return static_cast<const blink::WebTouchEvent&>(event->event()) 305 return static_cast<const blink::WebTouchEvent&>(event->event())
305 .dispatchType != blink::WebInputEvent::Blocking && 306 .dispatchType != blink::WebInputEvent::Blocking &&
306 handle_raf_aligned_touch_input_; 307 handle_raf_aligned_touch_input_;
307 default: 308 default:
308 return false; 309 return false;
309 } 310 }
310 } 311 }
311 312
312 } // namespace content 313 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698