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

Side by Side Diff: ui/events/latency_info.h

Issue 365463003: Implement scroll handler latency tracking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/telemetry/telemetry/web_perf/metrics/smoothness.py ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_EVENTS_LATENCY_INFO_H_ 5 #ifndef UI_EVENTS_LATENCY_INFO_H_
6 #define UI_EVENTS_LATENCY_INFO_H_ 6 #define UI_EVENTS_LATENCY_INFO_H_
7 7
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/containers/small_map.h" 12 #include "base/containers/small_map.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "ui/events/events_base_export.h" 14 #include "ui/events/events_base_export.h"
15 15
16 namespace ui { 16 namespace ui {
17 17
18 enum LatencyComponentType { 18 enum LatencyComponentType {
19 // ---------------------------BEGIN COMPONENT------------------------------- 19 // ---------------------------BEGIN COMPONENT-------------------------------
20 // BEGIN COMPONENT is when we show the latency begin in chrome://tracing. 20 // BEGIN COMPONENT is when we show the latency begin in chrome://tracing.
21 // Timestamp when the input event is sent from RenderWidgetHost to renderer. 21 // Timestamp when the input event is sent from RenderWidgetHost to renderer.
22 INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 22 INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT,
23 // Timestamp when the input event is received in plugin. 23 // Timestamp when the input event is received in plugin.
24 INPUT_EVENT_LATENCY_BEGIN_PLUGIN_COMPONENT, 24 INPUT_EVENT_LATENCY_BEGIN_PLUGIN_COMPONENT,
25 // Timestamp when a scroll update for the main thread is begun.
26 INPUT_EVENT_LATENCY_BEGIN_SCROLL_UPDATE_MAIN_COMPONENT,
25 // ---------------------------NORMAL COMPONENT------------------------------- 27 // ---------------------------NORMAL COMPONENT-------------------------------
26 // Timestamp when the scroll update gesture event is sent from RWH to 28 // Timestamp when the scroll update gesture event is sent from RWH to
27 // renderer. In Aura, touch event's LatencyInfo is carried over to the gesture 29 // renderer. In Aura, touch event's LatencyInfo is carried over to the gesture
28 // event. So gesture event's INPUT_EVENT_LATENCY_RWH_COMPONENT is the 30 // event. So gesture event's INPUT_EVENT_LATENCY_RWH_COMPONENT is the
29 // timestamp when its original touch events is sent from RWH to renderer. 31 // timestamp when its original touch events is sent from RWH to renderer.
30 // In non-aura platform, INPUT_EVENT_LATENCY_SCROLL_UPDATE_RWH_COMPONENT 32 // In non-aura platform, INPUT_EVENT_LATENCY_SCROLL_UPDATE_RWH_COMPONENT
31 // is the same as INPUT_EVENT_LATENCY_RWH_COMPONENT. 33 // is the same as INPUT_EVENT_LATENCY_RWH_COMPONENT.
32 INPUT_EVENT_LATENCY_SCROLL_UPDATE_RWH_COMPONENT, 34 INPUT_EVENT_LATENCY_SCROLL_UPDATE_RWH_COMPONENT,
33 // The original timestamp of the touch event which converts to scroll update. 35 // The original timestamp of the touch event which converts to scroll update.
34 INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, 36 INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT,
35 // Original timestamp for input event (e.g. timestamp from kernel). 37 // Original timestamp for input event (e.g. timestamp from kernel).
36 INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 38 INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT,
37 // Timestamp when the UI event is created. 39 // Timestamp when the UI event is created.
38 INPUT_EVENT_LATENCY_UI_COMPONENT, 40 INPUT_EVENT_LATENCY_UI_COMPONENT,
39 // This is special component indicating there is rendering scheduled for 41 // This is special component indicating there is rendering scheduled for
40 // the event associated with this LatencyInfo. 42 // the event associated with this LatencyInfo.
41 INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 43 INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT,
44 // Timestamp when a scroll update is forwarded to the main thread.
45 INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT,
42 // Timestamp when the touch event is acked. 46 // Timestamp when the touch event is acked.
43 INPUT_EVENT_LATENCY_ACKED_TOUCH_COMPONENT, 47 INPUT_EVENT_LATENCY_ACKED_TOUCH_COMPONENT,
44 // Frame number when a window snapshot was requested. The snapshot 48 // Frame number when a window snapshot was requested. The snapshot
45 // is taken when the rendering results actually reach the screen. 49 // is taken when the rendering results actually reach the screen.
46 WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT, 50 WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT,
47 // Frame number for a snapshot requested via 51 // Frame number for a snapshot requested via
48 // gpuBenchmarking.beginWindowSnapshotPNG 52 // gpuBenchmarking.beginWindowSnapshotPNG
49 // TODO(vkuzkokov): remove when patch adding this hits Stable 53 // TODO(vkuzkokov): remove when patch adding this hits Stable
50 WINDOW_OLD_SNAPSHOT_FRAME_NUMBER_COMPONENT, 54 WINDOW_OLD_SNAPSHOT_FRAME_NUMBER_COMPONENT,
51 // Timestamp when a tab is requested to be shown. 55 // Timestamp when a tab is requested to be shown.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 LatencyMap latency_components; 155 LatencyMap latency_components;
152 // The unique id for matching the ASYNC_BEGIN/END trace event. 156 // The unique id for matching the ASYNC_BEGIN/END trace event.
153 int64 trace_id; 157 int64 trace_id;
154 // Whether a terminal component has been added. 158 // Whether a terminal component has been added.
155 bool terminated; 159 bool terminated;
156 }; 160 };
157 161
158 } // namespace ui 162 } // namespace ui
159 163
160 #endif // UI_EVENTS_LATENCY_INFO_H_ 164 #endif // UI_EVENTS_LATENCY_INFO_H_
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/web_perf/metrics/smoothness.py ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698