Chromium Code Reviews| Index: ui/events/blink/compositor_thread_event_queue.cc |
| diff --git a/ui/events/blink/compositor_thread_event_queue.cc b/ui/events/blink/compositor_thread_event_queue.cc |
| index 5083d35d1383c43cd4c818321be1a62f4cf0bcf9..113510d489a2955a0442352d8c6dfa64acd19ae9 100644 |
| --- a/ui/events/blink/compositor_thread_event_queue.cc |
| +++ b/ui/events/blink/compositor_thread_event_queue.cc |
| @@ -5,6 +5,7 @@ |
| #include "ui/events/blink/compositor_thread_event_queue.h" |
| #include "base/memory/ptr_util.h" |
| +#include "base/trace_event/trace_event.h" |
| #include "ui/events/blink/blink_event_util.h" |
| #include "ui/events/blink/web_input_event_traits.h" |
| @@ -20,6 +21,11 @@ void CompositorThreadEventQueue::Queue( |
| if (queue_.empty() || !IsContinuousGestureEvent(new_event->event().type()) || |
| !IsCompatibleScrollorPinch(ToWebGestureEvent(new_event->event()), |
| ToWebGestureEvent(queue_.back()->event()))) { |
| + if (new_event->first_original_event()) { |
| + TRACE_EVENT_NESTABLE_ASYNC_BEGIN0("input", |
|
tdresser
2017/02/16 13:44:18
In what case would these nest?
chongz
2017/02/16 15:08:58
Added comments.
// Trace could be nested as there
|
| + "CompositorThreadEventQueue::Queue", |
| + new_event->first_original_event()); |
| + } |
| queue_.emplace_back(std::move(new_event)); |
| return; |
| } |
| @@ -88,6 +94,13 @@ std::unique_ptr<EventWithCallback> CompositorThreadEventQueue::Pop() { |
| result = std::move(queue_.front()); |
| queue_.pop_front(); |
| } |
| + |
| + if (result->first_original_event()) { |
| + TRACE_EVENT_NESTABLE_ASYNC_END2( |
| + "input", "CompositorThreadEventQueue::Queue", |
| + result->first_original_event(), "type", result->event().type(), |
| + "coalesced_count", result->coalesced_count()); |
| + } |
| return result; |
| } |