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