| 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_BASE_LATENCY_INFO_H_ | 5 #ifndef UI_BASE_LATENCY_INFO_H_ |
| 6 #define UI_BASE_LATENCY_INFO_H_ | 6 #define UI_BASE_LATENCY_INFO_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 int64 component_sequence_number); | 65 int64 component_sequence_number); |
| 66 | 66 |
| 67 // Modifies the current sequence number and adds a certain number of events | 67 // Modifies the current sequence number and adds a certain number of events |
| 68 // for a specific component. | 68 // for a specific component. |
| 69 void AddLatencyNumberWithTimestamp(LatencyComponentType component, | 69 void AddLatencyNumberWithTimestamp(LatencyComponentType component, |
| 70 int64 id, | 70 int64 id, |
| 71 int64 component_sequence_number, | 71 int64 component_sequence_number, |
| 72 base::TimeTicks time, | 72 base::TimeTicks time, |
| 73 uint32 event_count); | 73 uint32 event_count); |
| 74 | 74 |
| 75 bool HasLatencyComponent(LatencyComponentType type, int64 id) const; | 75 // Returns true if the a component with |type| and |id| is found in |
| 76 // the latency_components and the component is stored to |output| if |
| 77 // |output| is not NULL. Returns false if no such component is found. |
| 78 bool FindLatency(LatencyComponentType type, |
| 79 int64 id, |
| 80 LatencyComponent* output) const; |
| 76 | 81 |
| 77 void Clear(); | 82 void Clear(); |
| 78 | 83 |
| 79 LatencyMap latency_components; | 84 LatencyMap latency_components; |
| 80 | 85 |
| 81 // This represents the final time that a frame is displayed it. | 86 // This represents the final time that a frame is displayed it. |
| 82 base::TimeTicks swap_timestamp; | 87 base::TimeTicks swap_timestamp; |
| 83 }; | 88 }; |
| 84 | 89 |
| 85 } // namespace ui | 90 } // namespace ui |
| 86 | 91 |
| 87 #endif // UI_BASE_LATENCY_INFO_H_ | 92 #endif // UI_BASE_LATENCY_INFO_H_ |
| OLD | NEW |