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

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

Issue 833283003: Reland "Add new latency_info for tracking browser composite time." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename component Created 5 years, 11 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/common/gpu/image_transport_surface.cc ('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
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 INPUT_EVENT_LATENCY_ACK_RWH_COMPONENT, 47 INPUT_EVENT_LATENCY_ACK_RWH_COMPONENT,
48 // Frame number when a window snapshot was requested. The snapshot 48 // Frame number when a window snapshot was requested. The snapshot
49 // is taken when the rendering results actually reach the screen. 49 // is taken when the rendering results actually reach the screen.
50 WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT, 50 WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT,
51 // Frame number for a snapshot requested via 51 // Frame number for a snapshot requested via
52 // gpuBenchmarking.beginWindowSnapshotPNG 52 // gpuBenchmarking.beginWindowSnapshotPNG
53 // TODO(vkuzkokov): remove when patch adding this hits Stable 53 // TODO(vkuzkokov): remove when patch adding this hits Stable
54 WINDOW_OLD_SNAPSHOT_FRAME_NUMBER_COMPONENT, 54 WINDOW_OLD_SNAPSHOT_FRAME_NUMBER_COMPONENT,
55 // Timestamp when a tab is requested to be shown. 55 // Timestamp when a tab is requested to be shown.
56 TAB_SHOW_COMPONENT, 56 TAB_SHOW_COMPONENT,
57 // Timestamp of when the browser process receives a buffer swap notification
58 // from the renderer.
59 INPUT_EVENT_BROWSER_RECEIVED_RENDERER_SWAP_COMPONENT,
60 // Timestamp of when the gpu service began swap buffers, unlike
61 // INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT which measures after.
62 INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT,
57 // ---------------------------TERMINAL COMPONENT----------------------------- 63 // ---------------------------TERMINAL COMPONENT-----------------------------
58 // TERMINAL COMPONENT is when we show the latency end in chrome://tracing. 64 // TERMINAL COMPONENT is when we show the latency end in chrome://tracing.
59 // Timestamp when the mouse event is acked from renderer and it does not 65 // Timestamp when the mouse event is acked from renderer and it does not
60 // cause any rendering scheduled. 66 // cause any rendering scheduled.
61 INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT, 67 INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT,
62 // Timestamp when the touch event is acked from renderer and it does not 68 // Timestamp when the touch event is acked from renderer and it does not
63 // cause any rendering schedueld and does not generate any gesture event. 69 // cause any rendering schedueld and does not generate any gesture event.
64 INPUT_EVENT_LATENCY_TERMINATED_TOUCH_COMPONENT, 70 INPUT_EVENT_LATENCY_TERMINATED_TOUCH_COMPONENT,
65 // Timestamp when the gesture event is acked from renderer, and it does not 71 // Timestamp when the gesture event is acked from renderer, and it does not
66 // cause any rendering schedueld. 72 // cause any rendering schedueld.
(...skipping 30 matching lines...) Expand all
97 103
98 struct EVENTS_BASE_EXPORT InputCoordinate { 104 struct EVENTS_BASE_EXPORT InputCoordinate {
99 InputCoordinate(); 105 InputCoordinate();
100 InputCoordinate(float x, float y); 106 InputCoordinate(float x, float y);
101 107
102 float x; 108 float x;
103 float y; 109 float y;
104 }; 110 };
105 111
106 // Empirically determined constant based on a typical scroll sequence. 112 // Empirically determined constant based on a typical scroll sequence.
107 enum { kTypicalMaxComponentsPerLatencyInfo = 7 }; 113 enum { kTypicalMaxComponentsPerLatencyInfo = 9 };
108 114
109 enum { kMaxInputCoordinates = 2 }; 115 enum { kMaxInputCoordinates = 2 };
110 116
111 // Map a Latency Component (with a component-specific int64 id) to a 117 // Map a Latency Component (with a component-specific int64 id) to a
112 // component info. 118 // component info.
113 typedef base::SmallMap< 119 typedef base::SmallMap<
114 std::map<std::pair<LatencyComponentType, int64>, LatencyComponent>, 120 std::map<std::pair<LatencyComponentType, int64>, LatencyComponent>,
115 kTypicalMaxComponentsPerLatencyInfo> LatencyMap; 121 kTypicalMaxComponentsPerLatencyInfo> LatencyMap;
116 122
117 LatencyInfo(); 123 LatencyInfo();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 176
171 // The unique id for matching the ASYNC_BEGIN/END trace event. 177 // The unique id for matching the ASYNC_BEGIN/END trace event.
172 int64 trace_id; 178 int64 trace_id;
173 // Whether a terminal component has been added. 179 // Whether a terminal component has been added.
174 bool terminated; 180 bool terminated;
175 }; 181 };
176 182
177 } // namespace ui 183 } // namespace ui
178 184
179 #endif // UI_EVENTS_LATENCY_INFO_H_ 185 #endif // UI_EVENTS_LATENCY_INFO_H_
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface.cc ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698