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

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

Issue 2662173005: Revert of scheduler: Detect single event gestures correctly (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 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 if (shared_state_.events_.empty()) 224 if (shared_state_.events_.empty())
225 return; 225 return;
226 226
227 in_flight_event_ = shared_state_.events_.Pop(); 227 in_flight_event_ = shared_state_.events_.Pop();
228 } 228 }
229 DispatchInFlightEvent(); 229 DispatchInFlightEvent();
230 PossiblyScheduleMainFrame(); 230 PossiblyScheduleMainFrame();
231 } 231 }
232 232
233 void MainThreadEventQueue::EventHandled(blink::WebInputEvent::Type type, 233 void MainThreadEventQueue::EventHandled(blink::WebInputEvent::Type type,
234 blink::WebInputEventResult result,
235 InputEventAckState ack_result) { 234 InputEventAckState ack_result) {
236 if (in_flight_event_) { 235 if (in_flight_event_) {
237 for (const auto id : in_flight_event_->blockingCoalescedEventIds()) { 236 for (const auto id : in_flight_event_->blockingCoalescedEventIds()) {
238 client_->SendInputEventAck(routing_id_, type, ack_result, id); 237 client_->SendInputEventAck(routing_id_, type, ack_result, id);
239 if (renderer_scheduler_) { 238 if (renderer_scheduler_) {
240 renderer_scheduler_->DidHandleInputEventOnMainThread( 239 renderer_scheduler_->DidHandleInputEventOnMainThread(
241 in_flight_event_->event(), result); 240 in_flight_event_->event());
242 } 241 }
243 } 242 }
244 } 243 }
245 } 244 }
246 245
247 void MainThreadEventQueue::DispatchRafAlignedInput() { 246 void MainThreadEventQueue::DispatchRafAlignedInput() {
248 if (IsRafAlignedInputDisabled()) 247 if (IsRafAlignedInputDisabled())
249 return; 248 return;
250 249
251 std::deque<std::unique_ptr<EventWithDispatchType>> events_to_process; 250 std::deque<std::unique_ptr<EventWithDispatchType>> events_to_process;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 case blink::WebInputEvent::MouseWheel: 335 case blink::WebInputEvent::MouseWheel:
337 return handle_raf_aligned_mouse_input_; 336 return handle_raf_aligned_mouse_input_;
338 case blink::WebInputEvent::TouchMove: 337 case blink::WebInputEvent::TouchMove:
339 return handle_raf_aligned_touch_input_; 338 return handle_raf_aligned_touch_input_;
340 default: 339 default:
341 return false; 340 return false;
342 } 341 }
343 } 342 }
344 343
345 } // namespace content 344 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/input/main_thread_event_queue.h ('k') | content/renderer/input/main_thread_event_queue_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698