| 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..30b3f7eee3c535ab69fc3582fd1dd26378d07033 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,13 @@ 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 could be nested as there might be multiple events in queue.
|
| + // e.g. |ScrollUpdate|, |ScrollEnd|, and another scroll sequence.
|
| + TRACE_EVENT_NESTABLE_ASYNC_BEGIN0("input",
|
| + "CompositorThreadEventQueue::Queue",
|
| + new_event->first_original_event());
|
| + }
|
| queue_.emplace_back(std::move(new_event));
|
| return;
|
| }
|
| @@ -88,6 +96,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;
|
| }
|
|
|
|
|