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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; | 42 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; |
43 void Add(const MainThreadRenderingStats& other); | 43 void Add(const MainThreadRenderingStats& other); |
44 }; | 44 }; |
45 | 45 |
46 struct CC_EXPORT ImplThreadRenderingStats { | 46 struct CC_EXPORT ImplThreadRenderingStats { |
47 // Note: when adding new members, please remember to update EnumerateFields | 47 // Note: when adding new members, please remember to update EnumerateFields |
48 // and Add in rendering_stats.cc. | 48 // and Add in rendering_stats.cc. |
49 | 49 |
50 int64 frame_count; | 50 int64 frame_count; |
51 base::TimeDelta rasterize_time; | 51 base::TimeDelta rasterize_time; |
| 52 base::TimeDelta analysis_time; |
52 int64 rasterized_pixel_count; | 53 int64 rasterized_pixel_count; |
53 | 54 |
54 ImplThreadRenderingStats(); | 55 ImplThreadRenderingStats(); |
55 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; | 56 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; |
56 void Add(const ImplThreadRenderingStats& other); | 57 void Add(const ImplThreadRenderingStats& other); |
57 }; | 58 }; |
58 | 59 |
59 struct CC_EXPORT RenderingStats { | 60 struct CC_EXPORT RenderingStats { |
60 typedef RenderingStatsEnumerator Enumerator; | 61 typedef RenderingStatsEnumerator Enumerator; |
61 | 62 |
62 MainThreadRenderingStats main_stats; | 63 MainThreadRenderingStats main_stats; |
63 ImplThreadRenderingStats impl_stats; | 64 ImplThreadRenderingStats impl_stats; |
64 | 65 |
65 // Outputs the fields in this structure to the provided enumerator. | 66 // Outputs the fields in this structure to the provided enumerator. |
66 void EnumerateFields(Enumerator* enumerator) const; | 67 void EnumerateFields(Enumerator* enumerator) const; |
67 | 68 |
68 // Add fields of |other| to the fields in this structure. | 69 // Add fields of |other| to the fields in this structure. |
69 void Add(const RenderingStats& other); | 70 void Add(const RenderingStats& other); |
70 }; | 71 }; |
71 | 72 |
72 } // namespace cc | 73 } // namespace cc |
73 | 74 |
74 #endif // CC_DEBUG_RENDERING_STATS_H_ | 75 #endif // CC_DEBUG_RENDERING_STATS_H_ |
OLD | NEW |