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

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

Issue 2814483002: Splitting up RenderWidgetHostLatencyTracker and some renames. (Closed)
Patch Set: [Moving OnGpuSwapBuffersCompleted() back up. Created 3 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 | « ui/latency/latency_histogram_macros.h ('k') | ui/latency/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_LATENCY_LATENCY_INFO_H_ 5 #ifndef UI_LATENCY_LATENCY_INFO_H_
6 #define UI_LATENCY_LATENCY_INFO_H_ 6 #define UI_LATENCY_LATENCY_INFO_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT, 68 INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT,
69 // Timestamp when the event's ack is received by the RWH. 69 // Timestamp when the event's ack is received by the RWH.
70 INPUT_EVENT_LATENCY_ACK_RWH_COMPONENT, 70 INPUT_EVENT_LATENCY_ACK_RWH_COMPONENT,
71 // Frame number when a browser snapshot was requested. The snapshot 71 // Frame number when a browser snapshot was requested. The snapshot
72 // is taken when the rendering results actually reach the screen. 72 // is taken when the rendering results actually reach the screen.
73 BROWSER_SNAPSHOT_FRAME_NUMBER_COMPONENT, 73 BROWSER_SNAPSHOT_FRAME_NUMBER_COMPONENT,
74 // Timestamp when a tab is requested to be shown. 74 // Timestamp when a tab is requested to be shown.
75 TAB_SHOW_COMPONENT, 75 TAB_SHOW_COMPONENT,
76 // Timestamp when the frame is swapped in renderer. 76 // Timestamp when the frame is swapped in renderer.
77 INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT, 77 INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT,
78 // Timestamp of when the browser process receives a buffer swap notification 78 // Timestamp of when the display compositor receives a compositor frame from
79 // from the renderer. 79 // the renderer.
80 INPUT_EVENT_BROWSER_RECEIVED_RENDERER_SWAP_COMPONENT, 80 // Display compositor can be either in the browser process or in Mus.
81 DISPLAY_COMPOSITOR_RECEIVED_FRAME_COMPONENT,
81 // Timestamp of when the gpu service began swap buffers, unlike 82 // Timestamp of when the gpu service began swap buffers, unlike
82 // INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT which measures after. 83 // INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT which measures after.
83 INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT, 84 INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT,
84 // Timestamp of when the gesture scroll update is generated from a mouse wheel 85 // Timestamp of when the gesture scroll update is generated from a mouse wheel
85 // event. 86 // event.
86 INPUT_EVENT_LATENCY_GENERATE_SCROLL_UPDATE_FROM_MOUSE_WHEEL, 87 INPUT_EVENT_LATENCY_GENERATE_SCROLL_UPDATE_FROM_MOUSE_WHEEL,
87 // ---------------------------TERMINAL COMPONENT----------------------------- 88 // ---------------------------TERMINAL COMPONENT-----------------------------
88 // Timestamp when the event is acked from renderer when it does not 89 // Timestamp when the event is acked from renderer when it does not
89 // cause any rendering to be scheduled. 90 // cause any rendering to be scheduled.
90 INPUT_EVENT_LATENCY_TERMINATED_NO_SWAP_COMPONENT, 91 INPUT_EVENT_LATENCY_TERMINATED_NO_SWAP_COMPONENT,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 base::TimeTicks time, 187 base::TimeTicks time,
187 uint32_t event_count); 188 uint32_t event_count);
188 189
189 // Returns true if the a component with |type| and |id| is found in 190 // Returns true if the a component with |type| and |id| is found in
190 // the latency_components and the component is stored to |output| if 191 // the latency_components and the component is stored to |output| if
191 // |output| is not NULL. Returns false if no such component is found. 192 // |output| is not NULL. Returns false if no such component is found.
192 bool FindLatency(LatencyComponentType type, 193 bool FindLatency(LatencyComponentType type,
193 int64_t id, 194 int64_t id,
194 LatencyComponent* output) const; 195 LatencyComponent* output) const;
195 196
197 // Returns true if a component with |type| is found in the latency component.
198 // The first such component (when iterating over latency_components_) is
199 // stored to |output| if |output| is not NULL. Returns false if no such
200 // component is found.
201 bool FindLatency(LatencyComponentType type, LatencyComponent* output) const;
202
196 void RemoveLatency(LatencyComponentType type); 203 void RemoveLatency(LatencyComponentType type);
197 204
198 // Returns true if there is still room for keeping the |input_coordinate|, 205 // Returns true if there is still room for keeping the |input_coordinate|,
199 // false otherwise. 206 // false otherwise.
200 bool AddInputCoordinate(const gfx::PointF& input_coordinate); 207 bool AddInputCoordinate(const gfx::PointF& input_coordinate);
201 208
202 uint32_t input_coordinates_size() const { return input_coordinates_size_; } 209 uint32_t input_coordinates_size() const { return input_coordinates_size_; }
203 const gfx::PointF* input_coordinates() const { return input_coordinates_; } 210 const gfx::PointF* input_coordinates() const { return input_coordinates_; }
204 211
205 const LatencyMap& latency_components() const { return latency_components_; } 212 const LatencyMap& latency_components() const { return latency_components_; }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 #if !defined(OS_IOS) 259 #if !defined(OS_IOS)
253 friend struct IPC::ParamTraits<ui::LatencyInfo>; 260 friend struct IPC::ParamTraits<ui::LatencyInfo>;
254 friend struct mojo::StructTraits<ui::mojom::LatencyInfoDataView, 261 friend struct mojo::StructTraits<ui::mojom::LatencyInfoDataView,
255 ui::LatencyInfo>; 262 ui::LatencyInfo>;
256 #endif 263 #endif
257 }; 264 };
258 265
259 } // namespace ui 266 } // namespace ui
260 267
261 #endif // UI_LATENCY_LATENCY_INFO_H_ 268 #endif // UI_LATENCY_LATENCY_INFO_H_
OLDNEW
« no previous file with comments | « ui/latency/latency_histogram_macros.h ('k') | ui/latency/latency_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698