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" |
| 11 #include "base/debug/trace_event_argument.h" |
11 #include "base/time/time.h" | 12 #include "base/time/time.h" |
12 #include "base/values.h" | 13 #include "base/values.h" |
13 #include "cc/base/cc_export.h" | 14 #include "cc/base/cc_export.h" |
14 #include "cc/debug/traced_value.h" | 15 #include "cc/debug/traced_value.h" |
15 | 16 |
16 namespace cc { | 17 namespace cc { |
17 | 18 |
18 struct CC_EXPORT RenderingStats { | 19 struct CC_EXPORT RenderingStats { |
19 // Stores a sequence of TimeDelta objects. | 20 // Stores a sequence of TimeDelta objects. |
20 class CC_EXPORT TimeDeltaList { | 21 class CC_EXPORT TimeDeltaList { |
21 public: | 22 public: |
22 TimeDeltaList(); | 23 TimeDeltaList(); |
23 ~TimeDeltaList(); | 24 ~TimeDeltaList(); |
24 | 25 |
25 void Append(base::TimeDelta value); | 26 void Append(base::TimeDelta value); |
26 scoped_ptr<base::ListValue> AsListValueInMilliseconds() const; | 27 void AddToTracedValue(base::debug::TracedValue* list_value) const; |
| 28 |
27 void Add(const TimeDeltaList& other); | 29 void Add(const TimeDeltaList& other); |
28 | 30 |
29 private: | 31 private: |
30 std::list<base::TimeDelta> values; | 32 std::list<base::TimeDelta> values; |
31 }; | 33 }; |
32 | 34 |
33 struct CC_EXPORT MainThreadRenderingStats { | 35 struct CC_EXPORT MainThreadRenderingStats { |
34 // Note: when adding new members, please remember to update Add in | 36 // Note: when adding new members, please remember to update Add in |
35 // rendering_stats.cc. | 37 // rendering_stats.cc. |
36 | 38 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 MainThreadRenderingStats main_stats; | 77 MainThreadRenderingStats main_stats; |
76 ImplThreadRenderingStats impl_stats; | 78 ImplThreadRenderingStats impl_stats; |
77 | 79 |
78 // Add fields of |other| to the fields in this structure. | 80 // Add fields of |other| to the fields in this structure. |
79 void Add(const RenderingStats& other); | 81 void Add(const RenderingStats& other); |
80 }; | 82 }; |
81 | 83 |
82 } // namespace cc | 84 } // namespace cc |
83 | 85 |
84 #endif // CC_DEBUG_RENDERING_STATS_H_ | 86 #endif // CC_DEBUG_RENDERING_STATS_H_ |
OLD | NEW |