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

Unified Diff: ui/events/blink/event_with_callback.cc

Issue 2695603004: [VSync Queue] Add tracing for event queuing time and coalesced count (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/events/blink/input_handler_proxy.cc » ('j') | ui/events/blink/input_handler_proxy.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/blink/event_with_callback.cc
diff --git a/ui/events/blink/event_with_callback.cc b/ui/events/blink/event_with_callback.cc
index 90d2a57bfbdd7da83aa7d536f59cac99a87bdbc9..5808b25e69ab368a74b1fc922dff9d48de14e742 100644
--- a/ui/events/blink/event_with_callback.cc
+++ b/ui/events/blink/event_with_callback.cc
@@ -5,6 +5,7 @@
#include "ui/events/blink/event_with_callback.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/did_overscroll_params.h"
#include "ui/events/blink/web_input_event_traits.h"
@@ -23,6 +24,8 @@ EventWithCallback::EventWithCallback(
latency_(latency),
creation_timestamp_(timestamp_now),
last_coalesced_timestamp_(timestamp_now) {
+ TRACE_EVENT_ASYNC_BEGIN0("input", "InputHandlerProxy::EventWithCallback",
+ this);
original_events_.emplace_back(std::move(event), callback);
}
@@ -36,11 +39,15 @@ EventWithCallback::EventWithCallback(
latency_(latency),
creation_timestamp_(creation_timestamp),
last_coalesced_timestamp_(last_coalesced_timestamp) {
+ TRACE_EVENT_ASYNC_BEGIN0("input", "InputHandlerProxy::EventWithCallback",
+ this);
if (original_events)
original_events_.splice(original_events_.end(), *original_events);
}
-EventWithCallback::~EventWithCallback() {}
+EventWithCallback::~EventWithCallback() {
+ TRACE_EVENT_ASYNC_END0("input", "InputHandlerProxy::EventWithCallback", this);
+}
bool EventWithCallback::CanCoalesceWith(const EventWithCallback& other) const {
return CanCoalesce(other.event(), event());
« no previous file with comments | « no previous file | ui/events/blink/input_handler_proxy.cc » ('j') | ui/events/blink/input_handler_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698