OLD | NEW |
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 Loading... |
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 began compositing. |
| 58 INPUT_EVENT_BROWSER_COMPOSITE_COMPONENT, |
| 59 // Timestamp of when the gpu service began swap buffers, unlike |
| 60 // INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT which measures after. |
| 61 INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT, |
57 // ---------------------------TERMINAL COMPONENT----------------------------- | 62 // ---------------------------TERMINAL COMPONENT----------------------------- |
58 // TERMINAL COMPONENT is when we show the latency end in chrome://tracing. | 63 // 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 | 64 // Timestamp when the mouse event is acked from renderer and it does not |
60 // cause any rendering scheduled. | 65 // cause any rendering scheduled. |
61 INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT, | 66 INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT, |
62 // Timestamp when the touch event is acked from renderer and it does not | 67 // 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. | 68 // cause any rendering schedueld and does not generate any gesture event. |
64 INPUT_EVENT_LATENCY_TERMINATED_TOUCH_COMPONENT, | 69 INPUT_EVENT_LATENCY_TERMINATED_TOUCH_COMPONENT, |
65 // Timestamp when the gesture event is acked from renderer, and it does not | 70 // Timestamp when the gesture event is acked from renderer, and it does not |
66 // cause any rendering schedueld. | 71 // cause any rendering schedueld. |
(...skipping 30 matching lines...) Expand all Loading... |
97 | 102 |
98 struct EVENTS_BASE_EXPORT InputCoordinate { | 103 struct EVENTS_BASE_EXPORT InputCoordinate { |
99 InputCoordinate(); | 104 InputCoordinate(); |
100 InputCoordinate(float x, float y); | 105 InputCoordinate(float x, float y); |
101 | 106 |
102 float x; | 107 float x; |
103 float y; | 108 float y; |
104 }; | 109 }; |
105 | 110 |
106 // Empirically determined constant based on a typical scroll sequence. | 111 // Empirically determined constant based on a typical scroll sequence. |
107 enum { kTypicalMaxComponentsPerLatencyInfo = 7 }; | 112 enum { kTypicalMaxComponentsPerLatencyInfo = 9 }; |
108 | 113 |
109 enum { kMaxInputCoordinates = 2 }; | 114 enum { kMaxInputCoordinates = 2 }; |
110 | 115 |
111 // Map a Latency Component (with a component-specific int64 id) to a | 116 // Map a Latency Component (with a component-specific int64 id) to a |
112 // component info. | 117 // component info. |
113 typedef base::SmallMap< | 118 typedef base::SmallMap< |
114 std::map<std::pair<LatencyComponentType, int64>, LatencyComponent>, | 119 std::map<std::pair<LatencyComponentType, int64>, LatencyComponent>, |
115 kTypicalMaxComponentsPerLatencyInfo> LatencyMap; | 120 kTypicalMaxComponentsPerLatencyInfo> LatencyMap; |
116 | 121 |
117 LatencyInfo(); | 122 LatencyInfo(); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 175 |
171 // The unique id for matching the ASYNC_BEGIN/END trace event. | 176 // The unique id for matching the ASYNC_BEGIN/END trace event. |
172 int64 trace_id; | 177 int64 trace_id; |
173 // Whether a terminal component has been added. | 178 // Whether a terminal component has been added. |
174 bool terminated; | 179 bool terminated; |
175 }; | 180 }; |
176 | 181 |
177 } // namespace ui | 182 } // namespace ui |
178 | 183 |
179 #endif // UI_EVENTS_LATENCY_INFO_H_ | 184 #endif // UI_EVENTS_LATENCY_INFO_H_ |
OLD | NEW |