| 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 21 matching lines...) Expand all Loading... |
| 32 // Note: when adding new members, please remember to update EnumerateFields | 32 // Note: when adding new members, please remember to update EnumerateFields |
| 33 // and Add in rendering_stats.cc. | 33 // and Add in rendering_stats.cc. |
| 34 | 34 |
| 35 int64 frame_count; | 35 int64 frame_count; |
| 36 base::TimeDelta paint_time; | 36 base::TimeDelta paint_time; |
| 37 int64 painted_pixel_count; | 37 int64 painted_pixel_count; |
| 38 base::TimeDelta record_time; | 38 base::TimeDelta record_time; |
| 39 int64 recorded_pixel_count; | 39 int64 recorded_pixel_count; |
| 40 | 40 |
| 41 MainThreadRenderingStats(); | 41 MainThreadRenderingStats(); |
| 42 void IssueTraceEvent() const; | |
| 43 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; | 42 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; |
| 44 void Add(const MainThreadRenderingStats& other); | 43 void Add(const MainThreadRenderingStats& other); |
| 45 }; | 44 }; |
| 46 | 45 |
| 47 struct CC_EXPORT ImplThreadRenderingStats { | 46 struct CC_EXPORT ImplThreadRenderingStats { |
| 48 // Note: when adding new members, please remember to update EnumerateFields | 47 // Note: when adding new members, please remember to update EnumerateFields |
| 49 // and Add in rendering_stats.cc. | 48 // and Add in rendering_stats.cc. |
| 50 | 49 |
| 51 int64 frame_count; | 50 int64 frame_count; |
| 52 base::TimeDelta rasterize_time; | 51 base::TimeDelta rasterize_time; |
| 53 int64 rasterized_pixel_count; | 52 int64 rasterized_pixel_count; |
| 54 | 53 |
| 55 ImplThreadRenderingStats(); | 54 ImplThreadRenderingStats(); |
| 56 void IssueTraceEvent() const; | |
| 57 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; | 55 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; |
| 58 void Add(const ImplThreadRenderingStats& other); | 56 void Add(const ImplThreadRenderingStats& other); |
| 59 }; | 57 }; |
| 60 | 58 |
| 61 struct CC_EXPORT RenderingStats { | 59 struct CC_EXPORT RenderingStats { |
| 62 typedef RenderingStatsEnumerator Enumerator; | 60 typedef RenderingStatsEnumerator Enumerator; |
| 63 | 61 |
| 64 MainThreadRenderingStats main_stats; | 62 MainThreadRenderingStats main_stats; |
| 65 ImplThreadRenderingStats impl_stats; | 63 ImplThreadRenderingStats impl_stats; |
| 66 | 64 |
| 67 // Outputs the fields in this structure to the provided enumerator. | 65 // Outputs the fields in this structure to the provided enumerator. |
| 68 void EnumerateFields(Enumerator* enumerator) const; | 66 void EnumerateFields(Enumerator* enumerator) const; |
| 69 | 67 |
| 70 // Add fields of |other| to the fields in this structure. | 68 // Add fields of |other| to the fields in this structure. |
| 71 void Add(const RenderingStats& other); | 69 void Add(const RenderingStats& other); |
| 72 }; | 70 }; |
| 73 | 71 |
| 74 } // namespace cc | 72 } // namespace cc |
| 75 | 73 |
| 76 #endif // CC_DEBUG_RENDERING_STATS_H_ | 74 #endif // CC_DEBUG_RENDERING_STATS_H_ |
| OLD | NEW |