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

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

Issue 2621303004: Keep track of coalesced events in main thread event queue (Closed)
Patch Set: Rebase Created 3 years, 11 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 case DISPATCH_TYPE_BLOCKING: 186 case DISPATCH_TYPE_BLOCKING:
187 dispatch_type = DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN; 187 dispatch_type = DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN;
188 break; 188 break;
189 case DISPATCH_TYPE_NON_BLOCKING: 189 case DISPATCH_TYPE_NON_BLOCKING:
190 dispatch_type = DISPATCH_TYPE_NON_BLOCKING_NOTIFY_MAIN; 190 dispatch_type = DISPATCH_TYPE_NON_BLOCKING_NOTIFY_MAIN;
191 break; 191 break;
192 default: 192 default:
193 NOTREACHED(); 193 NOTREACHED();
194 } 194 }
195 } 195 }
196 client_->HandleEventOnMainThread(routing_id_, &in_flight_event_->event(), 196 client_->HandleEventOnMainThread(
197 in_flight_event_->latencyInfo(), 197 routing_id_, &in_flight_event_->coalesced_event(),
198 dispatch_type); 198 in_flight_event_->latencyInfo(), dispatch_type);
199 } 199 }
200 200
201 in_flight_event_.reset(); 201 in_flight_event_.reset();
202 } 202 }
203 203
204 void MainThreadEventQueue::PossiblyScheduleMainFrame() { 204 void MainThreadEventQueue::PossiblyScheduleMainFrame() {
205 if (IsRafAlignedInputDisabled()) 205 if (IsRafAlignedInputDisabled())
206 return; 206 return;
207 bool needs_main_frame = false; 207 bool needs_main_frame = false;
208 { 208 {
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 case blink::WebInputEvent::MouseWheel: 335 case blink::WebInputEvent::MouseWheel:
336 return handle_raf_aligned_mouse_input_; 336 return handle_raf_aligned_mouse_input_;
337 case blink::WebInputEvent::TouchMove: 337 case blink::WebInputEvent::TouchMove:
338 return handle_raf_aligned_touch_input_; 338 return handle_raf_aligned_touch_input_;
339 default: 339 default:
340 return false; 340 return false;
341 } 341 }
342 } 342 }
343 343
344 } // 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