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

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

Issue 18937002: Add UMA/Telemetry stats for end-to-end scroll latency (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: refactor NewInputLatencyInfo() Created 7 years, 5 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
« no previous file with comments | « tools/perf/measurements/smoothness.py ('k') | no next file » | 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_BASE_LATENCY_INFO_H_ 5 #ifndef UI_BASE_LATENCY_INFO_H_
6 #define UI_BASE_LATENCY_INFO_H_ 6 #define UI_BASE_LATENCY_INFO_H_
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "ui/base/ui_export.h" 13 #include "ui/base/ui_export.h"
14 14
15 namespace ui { 15 namespace ui {
16 16
17 enum LatencyComponentType { 17 enum LatencyComponentType {
18 // Timestamp when the input event is sent from RenderWidgetHost to renderer. 18 // Timestamp when the input event is sent from RenderWidgetHost to renderer.
19 INPUT_EVENT_LATENCY_RWH_COMPONENT, 19 INPUT_EVENT_LATENCY_RWH_COMPONENT,
20 // Timestamp when the injected event is sent from RenderWidgetHost to 20 // Timestamp when the scroll gesture event is sent from RenderWidgetHost to
21 // renderer. For example, in Aura, touch event's LatencyInfo is carried over 21 // renderer. In Aura, touch event's LatencyInfo is carried over to the gesture
22 // to the injected gesture event. So gesture event's 22 // event. So gesture event's INPUT_EVENT_LATENCY_RWH_COMPONENT is the
23 // INPUT_EVENT_LATENCY_RWH_COMPONENT is the timestamp when its original touch 23 // timestamp when its original touch events is sent from RWH to renderer.
24 // events is sent from RWH to renderer. In non-aura platform, 24 // In non-aura platform, INPUT_EVENT_LATENCY_GESTURE_SCROLL_RWH_COMPONENT
25 // INPUT_EVENT_LATENCY_RWH_COMPONENT is the same as 25 // is the same as INPUT_EVENT_LATENCY_RWH_COMPONENT.
26 // INPUT_EVENT_LATENCY_INJECTED_RWH_COMPONENT. 26 INPUT_EVENT_LATENCY_GESTURE_SCROLL_RWH_COMPONENT,
Rick Byers 2013/07/10 17:27:14 By the way, I'm guessing you'll eventually want to
Yufeng Shen (Slow to review) 2013/07/10 19:38:24 right, changed to add SCROLL_UPDATE_RWH_COMPONENT
27 INPUT_EVENT_LATENCY_INJECTED_RWH_COMPONENT,
28 // Original timestamp for input event (e.g. timestamp from kernel). 27 // Original timestamp for input event (e.g. timestamp from kernel).
29 INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 28 INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT,
30 // Timestamp when the UI event is created. 29 // Timestamp when the UI event is created.
31 INPUT_EVENT_LATENCY_UI_COMPONENT, 30 INPUT_EVENT_LATENCY_UI_COMPONENT,
32 // Timestamp when the event is acked from renderer. This is currently set 31 // Timestamp when the event is acked from renderer. This is currently set
33 // only for touch events. 32 // only for touch events.
34 INPUT_EVENT_LATENCY_ACKED_COMPONENT 33 INPUT_EVENT_LATENCY_ACKED_COMPONENT
35 }; 34 };
36 35
37 struct UI_EXPORT LatencyInfo { 36 struct UI_EXPORT LatencyInfo {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 82
84 LatencyMap latency_components; 83 LatencyMap latency_components;
85 84
86 // This represents the final time that a frame is displayed it. 85 // This represents the final time that a frame is displayed it.
87 base::TimeTicks swap_timestamp; 86 base::TimeTicks swap_timestamp;
88 }; 87 };
89 88
90 } // namespace ui 89 } // namespace ui
91 90
92 #endif // UI_BASE_LATENCY_INFO_H_ 91 #endif // UI_BASE_LATENCY_INFO_H_
OLDNEW
« no previous file with comments | « tools/perf/measurements/smoothness.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698