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

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

Issue 1911963005: Fix reporting of TouchToFirstScroll latency metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a few nits Created 4 years, 8 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 | « content/browser/renderer_host/render_widget_host_impl.h ('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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Timestamp when a tab is requested to be shown. 60 // Timestamp when a tab is requested to be shown.
61 TAB_SHOW_COMPONENT, 61 TAB_SHOW_COMPONENT,
62 // Timestamp when the frame is swapped in renderer. 62 // Timestamp when the frame is swapped in renderer.
63 INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT, 63 INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT,
64 // Timestamp of when the browser process receives a buffer swap notification 64 // Timestamp of when the browser process receives a buffer swap notification
65 // from the renderer. 65 // from the renderer.
66 INPUT_EVENT_BROWSER_RECEIVED_RENDERER_SWAP_COMPONENT, 66 INPUT_EVENT_BROWSER_RECEIVED_RENDERER_SWAP_COMPONENT,
67 // Timestamp of when the gpu service began swap buffers, unlike 67 // Timestamp of when the gpu service began swap buffers, unlike
68 // INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT which measures after. 68 // INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT which measures after.
69 INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT, 69 INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT,
70 // Timestamp of when the gesture scroll update is generated from a mouse wheel
71 // event.
72 INPUT_EVENT_LATENCY_GENERATE_SCROLL_UPDATE_FROM_MOUSE_WHEEL,
70 // ---------------------------TERMINAL COMPONENT----------------------------- 73 // ---------------------------TERMINAL COMPONENT-----------------------------
71 // TERMINAL COMPONENT is when we show the latency end in chrome://tracing. 74 // TERMINAL COMPONENT is when we show the latency end in chrome://tracing.
72 // Timestamp when the mouse event is acked from renderer and it does not 75 // Timestamp when the mouse event is acked from renderer and it does not
73 // cause any rendering scheduled. 76 // cause any rendering scheduled.
74 INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT, 77 INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT,
75 // Timestamp when the mouse wheel event is acked from renderer and it does not 78 // Timestamp when the mouse wheel event is acked from renderer and it does not
76 // cause any rendering scheduled. 79 // cause any rendering scheduled.
77 INPUT_EVENT_LATENCY_TERMINATED_MOUSE_WHEEL_COMPONENT, 80 INPUT_EVENT_LATENCY_TERMINATED_MOUSE_WHEEL_COMPONENT,
78 // Timestamp when the keyboard event is acked from renderer and it does not 81 // Timestamp when the keyboard event is acked from renderer and it does not
79 // cause any rendering scheduled. 82 // cause any rendering scheduled.
80 INPUT_EVENT_LATENCY_TERMINATED_KEYBOARD_COMPONENT, 83 INPUT_EVENT_LATENCY_TERMINATED_KEYBOARD_COMPONENT,
81 // Timestamp when the touch event is acked from renderer and it does not 84 // Timestamp when the touch event is acked from renderer and it does not
82 // cause any rendering schedueld and does not generate any gesture event. 85 // cause any rendering scheduled and does not generate any gesture event.
83 INPUT_EVENT_LATENCY_TERMINATED_TOUCH_COMPONENT, 86 INPUT_EVENT_LATENCY_TERMINATED_TOUCH_COMPONENT,
84 // Timestamp when the gesture event is acked from renderer, and it does not 87 // Timestamp when the gesture event is acked from renderer, and it does not
85 // cause any rendering schedueld. 88 // cause any rendering scheduled.
86 INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT, 89 INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT,
87 // Timestamp when the frame is swapped (i.e. when the rendering caused by 90 // Timestamp when the frame is swapped (i.e. when the rendering caused by
88 // input event actually takes effect). 91 // input event actually takes effect).
89 INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 92 INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT,
90 // This component indicates that the input causes a commit to be scheduled 93 // This component indicates that the input causes a commit to be scheduled
91 // but the commit failed. 94 // but the commit failed.
92 INPUT_EVENT_LATENCY_TERMINATED_COMMIT_FAILED_COMPONENT, 95 INPUT_EVENT_LATENCY_TERMINATED_COMMIT_FAILED_COMPONENT,
93 // This component indicates that the input causes a commit to be scheduled 96 // This component indicates that the input causes a commit to be scheduled
94 // but the commit was aborted since it carried no new information. 97 // but the commit was aborted since it carried no new information.
95 INPUT_EVENT_LATENCY_TERMINATED_COMMIT_NO_UPDATE_COMPONENT, 98 INPUT_EVENT_LATENCY_TERMINATED_COMMIT_NO_UPDATE_COMPONENT,
96 // This component indicates that the input causes a swap to be scheduled 99 // This component indicates that the input causes a swap to be scheduled
97 // but the swap failed. 100 // but the swap failed.
98 INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT, 101 INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT,
99 LATENCY_COMPONENT_TYPE_LAST = 102 LATENCY_COMPONENT_TYPE_LAST =
100 INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT, 103 INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT,
101 }; 104 };
102 105
103 class EVENTS_BASE_EXPORT LatencyInfo { 106 class EVENTS_BASE_EXPORT LatencyInfo {
104 public: 107 public:
105 struct LatencyComponent { 108 struct LatencyComponent {
106 // Nondecreasing number that can be used to determine what events happened 109 // Nondecreasing number that can be used to determine what events happened
107 // in the component at the time this struct was sent on to the next 110 // in the component at the time this struct was sent on to the next
108 // component. 111 // component.
109 int64_t sequence_number; 112 int64_t sequence_number;
110 // Average time of events that happened in this component. 113 // Average time of events that happened in this component.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 bool terminated_; 237 bool terminated_;
235 238
236 #if !defined(OS_IOS) 239 #if !defined(OS_IOS)
237 friend struct IPC::ParamTraits<ui::LatencyInfo>; 240 friend struct IPC::ParamTraits<ui::LatencyInfo>;
238 #endif 241 #endif
239 }; 242 };
240 243
241 } // namespace ui 244 } // namespace ui
242 245
243 #endif // UI_EVENTS_LATENCY_INFO_H_ 246 #endif // UI_EVENTS_LATENCY_INFO_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698