OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 CC_DEBUG_RENDERING_STATS_H_ | 5 #ifndef CC_DEBUG_RENDERING_STATS_H_ |
6 #define CC_DEBUG_RENDERING_STATS_H_ | 6 #define CC_DEBUG_RENDERING_STATS_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 class CC_EXPORT TimeDeltaList { | 21 class CC_EXPORT TimeDeltaList { |
22 public: | 22 public: |
23 TimeDeltaList(); | 23 TimeDeltaList(); |
24 ~TimeDeltaList(); | 24 ~TimeDeltaList(); |
25 | 25 |
26 void Append(base::TimeDelta value); | 26 void Append(base::TimeDelta value); |
27 void AddToTracedValue(base::debug::TracedValue* list_value) const; | 27 void AddToTracedValue(base::debug::TracedValue* list_value) const; |
28 | 28 |
29 void Add(const TimeDeltaList& other); | 29 void Add(const TimeDeltaList& other); |
30 | 30 |
| 31 base::TimeDelta GetLastTimeDelta() const; |
| 32 |
31 private: | 33 private: |
32 std::list<base::TimeDelta> values; | 34 std::list<base::TimeDelta> values; |
33 }; | 35 }; |
34 | 36 |
35 struct CC_EXPORT MainThreadRenderingStats { | 37 struct CC_EXPORT MainThreadRenderingStats { |
36 // Note: when adding new members, please remember to update Add in | 38 // Note: when adding new members, please remember to update Add in |
37 // rendering_stats.cc. | 39 // rendering_stats.cc. |
38 | 40 |
39 base::TimeDelta paint_time; | 41 base::TimeDelta paint_time; |
40 int64 painted_pixel_count; | 42 int64 painted_pixel_count; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 MainThreadRenderingStats main_stats; | 78 MainThreadRenderingStats main_stats; |
77 ImplThreadRenderingStats impl_stats; | 79 ImplThreadRenderingStats impl_stats; |
78 | 80 |
79 // Add fields of |other| to the fields in this structure. | 81 // Add fields of |other| to the fields in this structure. |
80 void Add(const RenderingStats& other); | 82 void Add(const RenderingStats& other); |
81 }; | 83 }; |
82 | 84 |
83 } // namespace cc | 85 } // namespace cc |
84 | 86 |
85 #endif // CC_DEBUG_RENDERING_STATS_H_ | 87 #endif // CC_DEBUG_RENDERING_STATS_H_ |
OLD | NEW |