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

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: 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
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 scroll update gesture from a mouse wheel event.
tdresser 2016/04/22 17:55:59 Comment is missing a verb or two.
dtapuska 2016/04/22 18:15:00 Done.
71 INPUT_EVENT_LATENCY_GENERATE_SCROLL_UPDATE_FROM_MOUSE_WHEEL,
70 // ---------------------------TERMINAL COMPONENT----------------------------- 72 // ---------------------------TERMINAL COMPONENT-----------------------------
71 // TERMINAL COMPONENT is when we show the latency end in chrome://tracing. 73 // 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 74 // Timestamp when the mouse event is acked from renderer and it does not
73 // cause any rendering scheduled. 75 // cause any rendering scheduled.
74 INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT, 76 INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT,
75 // Timestamp when the mouse wheel event is acked from renderer and it does not 77 // Timestamp when the mouse wheel event is acked from renderer and it does not
76 // cause any rendering scheduled. 78 // cause any rendering scheduled.
77 INPUT_EVENT_LATENCY_TERMINATED_MOUSE_WHEEL_COMPONENT, 79 INPUT_EVENT_LATENCY_TERMINATED_MOUSE_WHEEL_COMPONENT,
78 // Timestamp when the keyboard event is acked from renderer and it does not 80 // Timestamp when the keyboard event is acked from renderer and it does not
79 // cause any rendering scheduled. 81 // cause any rendering scheduled.
(...skipping 10 matching lines...) Expand all
90 // This component indicates that the input causes a commit to be scheduled 92 // This component indicates that the input causes a commit to be scheduled
91 // but the commit failed. 93 // but the commit failed.
92 INPUT_EVENT_LATENCY_TERMINATED_COMMIT_FAILED_COMPONENT, 94 INPUT_EVENT_LATENCY_TERMINATED_COMMIT_FAILED_COMPONENT,
93 // This component indicates that the input causes a commit to be scheduled 95 // This component indicates that the input causes a commit to be scheduled
94 // but the commit was aborted since it carried no new information. 96 // but the commit was aborted since it carried no new information.
95 INPUT_EVENT_LATENCY_TERMINATED_COMMIT_NO_UPDATE_COMPONENT, 97 INPUT_EVENT_LATENCY_TERMINATED_COMMIT_NO_UPDATE_COMPONENT,
96 // This component indicates that the input causes a swap to be scheduled 98 // This component indicates that the input causes a swap to be scheduled
97 // but the swap failed. 99 // but the swap failed.
98 INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT, 100 INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT,
99 LATENCY_COMPONENT_TYPE_LAST = 101 LATENCY_COMPONENT_TYPE_LAST =
100 INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT, 102 INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT,
101 }; 103 };
102 104
103 class EVENTS_BASE_EXPORT LatencyInfo { 105 class EVENTS_BASE_EXPORT LatencyInfo {
104 public: 106 public:
105 struct LatencyComponent { 107 struct LatencyComponent {
106 // Nondecreasing number that can be used to determine what events happened 108 // 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 109 // in the component at the time this struct was sent on to the next
108 // component. 110 // component.
109 int64_t sequence_number; 111 int64_t sequence_number;
110 // Average time of events that happened in this component. 112 // Average time of events that happened in this component.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 bool terminated_; 236 bool terminated_;
235 237
236 #if !defined(OS_IOS) 238 #if !defined(OS_IOS)
237 friend struct IPC::ParamTraits<ui::LatencyInfo>; 239 friend struct IPC::ParamTraits<ui::LatencyInfo>;
238 #endif 240 #endif
239 }; 241 };
240 242
241 } // namespace ui 243 } // namespace ui
242 244
243 #endif // UI_EVENTS_LATENCY_INFO_H_ 245 #endif // UI_EVENTS_LATENCY_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698