| 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 <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "ui/events/events_export.h" | 13 #include "ui/events/events_base_export.h" |
| 14 | 14 |
| 15 namespace ui { | 15 namespace ui { |
| 16 | 16 |
| 17 enum LatencyComponentType { | 17 enum LatencyComponentType { |
| 18 // ---------------------------BEGIN COMPONENT------------------------------- | 18 // ---------------------------BEGIN COMPONENT------------------------------- |
| 19 // BEGIN COMPONENT is when we show the latency begin in chrome://tracing. | 19 // BEGIN COMPONENT is when we show the latency begin in chrome://tracing. |
| 20 // Timestamp when the input event is sent from RenderWidgetHost to renderer. | 20 // Timestamp when the input event is sent from RenderWidgetHost to renderer. |
| 21 INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 21 INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
| 22 // ---------------------------NORMAL COMPONENT------------------------------- | 22 // ---------------------------NORMAL COMPONENT------------------------------- |
| 23 // Timestamp when the scroll update gesture event is sent from RWH to | 23 // Timestamp when the scroll update gesture event is sent from RWH to |
| (...skipping 26 matching lines...) Expand all Loading... |
| 50 // cause any rendering schedueld. | 50 // cause any rendering schedueld. |
| 51 INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT, | 51 INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT, |
| 52 // Timestamp when the frame is swapped (i.e. when the rendering caused by | 52 // Timestamp when the frame is swapped (i.e. when the rendering caused by |
| 53 // input event actually takes effect). | 53 // input event actually takes effect). |
| 54 INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, | 54 INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, |
| 55 // Frame number when a window snapshot was requested. The snapshot | 55 // Frame number when a window snapshot was requested. The snapshot |
| 56 // is taken when the rendering results actually reach the screen. | 56 // is taken when the rendering results actually reach the screen. |
| 57 WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT | 57 WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 struct EVENTS_EXPORT LatencyInfo { | 60 struct EVENTS_BASE_EXPORT LatencyInfo { |
| 61 struct LatencyComponent { | 61 struct LatencyComponent { |
| 62 // Nondecreasing number that can be used to determine what events happened | 62 // Nondecreasing number that can be used to determine what events happened |
| 63 // in the component at the time this struct was sent on to the next | 63 // in the component at the time this struct was sent on to the next |
| 64 // component. | 64 // component. |
| 65 int64 sequence_number; | 65 int64 sequence_number; |
| 66 // Average time of events that happened in this component. | 66 // Average time of events that happened in this component. |
| 67 base::TimeTicks event_time; | 67 base::TimeTicks event_time; |
| 68 // Count of events that happened in this component | 68 // Count of events that happened in this component |
| 69 uint32 event_count; | 69 uint32 event_count; |
| 70 }; | 70 }; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 LatencyMap latency_components; | 112 LatencyMap latency_components; |
| 113 // The unique id for matching the ASYNC_BEGIN/END trace event. | 113 // The unique id for matching the ASYNC_BEGIN/END trace event. |
| 114 int64 trace_id; | 114 int64 trace_id; |
| 115 // Whether a terminal component has been added. | 115 // Whether a terminal component has been added. |
| 116 bool terminated; | 116 bool terminated; |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 } // namespace ui | 119 } // namespace ui |
| 120 | 120 |
| 121 #endif // UI_EVENTS_LATENCY_INFO_H_ | 121 #endif // UI_EVENTS_LATENCY_INFO_H_ |
| OLD | NEW |