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

Unified Diff: ui/events/latency_info.h

Issue 25022003: Report LatencyInfo through trace buffer (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix typo Created 7 years, 2 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
Index: ui/events/latency_info.h
diff --git a/ui/events/latency_info.h b/ui/events/latency_info.h
index 8bf56100dfd84324c1dc9b40923244ba580f2400..4b13c165f94c16f3d25b6f714c522a4778518494 100644
--- a/ui/events/latency_info.h
+++ b/ui/events/latency_info.h
@@ -15,8 +15,11 @@
namespace ui {
enum LatencyComponentType {
+ // ---------------------------BEGIN COMPONENT-------------------------------
+ // BEGIN COMPONENT is when we show the latency begin in chrome://tracing.
// Timestamp when the input event is sent from RenderWidgetHost to renderer.
- INPUT_EVENT_LATENCY_RWH_COMPONENT,
+ INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT,
sadrul 2013/10/09 19:23:27 Maybe match the comment and just call this I_E_L_B
Yufeng Shen (Slow to review) 2013/10/09 20:53:50 oh, here by BEGIN COMPONENT I meant it is contrast
+ // ---------------------------NORMAL COMPONENT-------------------------------
// Timestamp when the scroll update gesture event is sent from RWH to
// renderer. In Aura, touch event's LatencyInfo is carried over to the gesture
// event. So gesture event's INPUT_EVENT_LATENCY_RWH_COMPONENT is the
@@ -30,9 +33,25 @@ enum LatencyComponentType {
INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT,
// Timestamp when the UI event is created.
INPUT_EVENT_LATENCY_UI_COMPONENT,
- // Timestamp when the event is acked from renderer. This is currently set
- // only for touch events.
- INPUT_EVENT_LATENCY_ACKED_COMPONENT
+ // This is special component indicating there is rendering scheduled for
+ // the event associated with this LatencyInfo.
+ INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT,
+ // Timestamp when the touch event is acked.
+ INPUT_EVENT_LATENCY_ACKED_TOUCH_COMPONENT,
+ // ---------------------------TERMINAL COMPONENT-----------------------------
+ // TERMINAL COMPONENT is when we show the latency end in chrome://tracing.
+ // Timestamp when the mouse event is acked from renderer and it does not
+ // cause any rendering scheduled.
+ INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT,
+ // Timestamp when the touch event is acked from renderer and it does not
+ // cause any rendering schedueld and does not generate any gesture event.
+ INPUT_EVENT_LATENCY_TERMINATED_TOUCH_COMPONENT,
+ // Timestamp when the gesture event is acked from renderer, and it does not
+ // cause any rendering schedueld.
+ INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT,
+ // Timestamp when the frame is swapped (i.e. when the rendering caused by
+ // input event actually takes effect).
+ INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT,
};
struct EVENTS_EXPORT LatencyInfo {
@@ -86,9 +105,10 @@ struct EVENTS_EXPORT LatencyInfo {
void Clear();
LatencyMap latency_components;
-
- // This represents the final time that a frame is displayed it.
- base::TimeTicks swap_timestamp;
+ // The unique id for matching the ASYNC_BEGIN/END trace event.
+ int64 trace_id;
+ // Whether a terminal component has been added.
+ bool terminated;
};
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698