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

Unified Diff: ui/events/latency_info.h

Issue 1287103004: Sync ui/events to chromium @ https://codereview.chromium.org/1210203002 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 4 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 | « ui/events/keycodes/xkb_keysym.h ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/latency_info.h
diff --git a/ui/events/latency_info.h b/ui/events/latency_info.h
index b6724b86154ac8dce6948aa4d0ac697bfb768384..ffc9bdbde5e87193925f078ce28bbc7ebad46a43 100644
--- a/ui/events/latency_info.h
+++ b/ui/events/latency_info.h
@@ -5,6 +5,7 @@
#ifndef UI_EVENTS_LATENCY_INFO_H_
#define UI_EVENTS_LATENCY_INFO_H_
+#include <string>
#include <utility>
#include <vector>
@@ -22,8 +23,10 @@ enum LatencyComponentType {
INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT,
// Timestamp when the input event is received in plugin.
INPUT_EVENT_LATENCY_BEGIN_PLUGIN_COMPONENT,
- // Timestamp when a scroll update for the main thread is begun.
- INPUT_EVENT_LATENCY_BEGIN_SCROLL_UPDATE_MAIN_COMPONENT,
+ // In threaded scrolling, main thread scroll listener update is async to
+ // scroll processing in impl thread. This is the timestamp when we consider
+ // the main thread scroll listener update is begun.
+ LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT,
// ---------------------------NORMAL COMPONENT-------------------------------
// The original timestamp of the touch event which converts to scroll update.
INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT,
@@ -47,10 +50,6 @@ enum LatencyComponentType {
// Frame number when a window snapshot was requested. The snapshot
// is taken when the rendering results actually reach the screen.
WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT,
- // Frame number for a snapshot requested via
- // gpuBenchmarking.beginWindowSnapshotPNG
- // TODO(vkuzkokov): remove when patch adding this hits Stable
- WINDOW_OLD_SNAPSHOT_FRAME_NUMBER_COMPONENT,
// Timestamp when a tab is requested to be shown.
TAB_SHOW_COMPONENT,
// Timestamp when the frame is swapped in renderer.
@@ -147,6 +146,14 @@ struct EVENTS_BASE_EXPORT LatencyInfo {
int64 id,
int64 component_sequence_number);
+ // Similar to |AddLatencyNumber|, and also appends |trace_name_str| to
+ // the trace event's name.
+ // This function should only be called when adding a BEGIN component.
+ void AddLatencyNumberWithTraceName(LatencyComponentType component,
+ int64 id,
+ int64 component_sequence_number,
+ const char* trace_name_str);
+
// Modifies the current sequence number and adds a certain number of events
// for a specific component.
void AddLatencyNumberWithTimestamp(LatencyComponentType component,
@@ -155,6 +162,13 @@ struct EVENTS_BASE_EXPORT LatencyInfo {
base::TimeTicks time,
uint32 event_count);
+ void AddLatencyNumberWithTimestampImpl(LatencyComponentType component,
+ int64 id,
+ int64 component_sequence_number,
+ base::TimeTicks time,
+ uint32 event_count,
+ const char* trace_name_str);
+
// Returns true if the a component with |type| and |id| is found in
// the latency_components and the component is stored to |output| if
// |output| is not NULL. Returns false if no such component is found.
@@ -166,8 +180,9 @@ struct EVENTS_BASE_EXPORT LatencyInfo {
void Clear();
- // Records the |event_type| in trace buffer as TRACE_EVENT_ASYNC_STEP.
- void TraceEventType(const char* event_type);
+ // Shown as part of the name of the trace event for this LatencyInfo.
+ // String is empty if no tracing is enabled.
+ std::string trace_name;
LatencyMap latency_components;
« no previous file with comments | « ui/events/keycodes/xkb_keysym.h ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698