| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 typedef std::map<std::pair<LatencyComponentType, int64>, LatencyComponent> | 52 typedef std::map<std::pair<LatencyComponentType, int64>, LatencyComponent> |
| 53 LatencyMap; | 53 LatencyMap; |
| 54 | 54 |
| 55 LatencyInfo(); | 55 LatencyInfo(); |
| 56 | 56 |
| 57 ~LatencyInfo(); | 57 ~LatencyInfo(); |
| 58 | 58 |
| 59 // Merges the contents of another LatencyInfo into this one. | 59 // Merges the contents of another LatencyInfo into this one. |
| 60 void MergeWith(const LatencyInfo& other); | 60 void MergeWith(const LatencyInfo& other); |
| 61 | 61 |
| 62 // Add LatencyComponents that are in |other| but not in |this|. |
| 63 void AddNewLatencyFrom(const LatencyInfo& other); |
| 64 |
| 62 // Modifies the current sequence number for a component, and adds a new | 65 // Modifies the current sequence number for a component, and adds a new |
| 63 // sequence number with the current timestamp. | 66 // sequence number with the current timestamp. |
| 64 void AddLatencyNumber(LatencyComponentType component, | 67 void AddLatencyNumber(LatencyComponentType component, |
| 65 int64 id, | 68 int64 id, |
| 66 int64 component_sequence_number); | 69 int64 component_sequence_number); |
| 67 | 70 |
| 68 // Modifies the current sequence number and adds a certain number of events | 71 // Modifies the current sequence number and adds a certain number of events |
| 69 // for a specific component. | 72 // for a specific component. |
| 70 void AddLatencyNumberWithTimestamp(LatencyComponentType component, | 73 void AddLatencyNumberWithTimestamp(LatencyComponentType component, |
| 71 int64 id, | 74 int64 id, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 84 | 87 |
| 85 LatencyMap latency_components; | 88 LatencyMap latency_components; |
| 86 | 89 |
| 87 // This represents the final time that a frame is displayed it. | 90 // This represents the final time that a frame is displayed it. |
| 88 base::TimeTicks swap_timestamp; | 91 base::TimeTicks swap_timestamp; |
| 89 }; | 92 }; |
| 90 | 93 |
| 91 } // namespace ui | 94 } // namespace ui |
| 92 | 95 |
| 93 #endif // UI_BASE_LATENCY_INFO_H_ | 96 #endif // UI_BASE_LATENCY_INFO_H_ |
| OLD | NEW |