| 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 14 matching lines...) Expand all Loading... |
| 25 const base::TimeDelta& value) = 0; | 25 const base::TimeDelta& value) = 0; |
| 26 | 26 |
| 27 protected: | 27 protected: |
| 28 virtual ~RenderingStatsEnumerator() {} | 28 virtual ~RenderingStatsEnumerator() {} |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 struct CC_EXPORT MainThreadRenderingStats { | 31 struct CC_EXPORT MainThreadRenderingStats { |
| 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 animation_frame_count; | 35 int64 frame_count; |
| 36 int64 screen_frame_count; | |
| 37 base::TimeDelta paint_time; | 36 base::TimeDelta paint_time; |
| 37 int64 painted_pixel_count; |
| 38 base::TimeDelta record_time; | 38 base::TimeDelta record_time; |
| 39 base::TimeDelta best_record_time; | |
| 40 base::TimeDelta commit_time; | |
| 41 int64 commit_count; | |
| 42 int64 painted_pixel_count; | |
| 43 int64 recorded_pixel_count; | 39 int64 recorded_pixel_count; |
| 44 int64 image_gathering_count; | |
| 45 base::TimeDelta image_gathering_time; | |
| 46 | 40 |
| 47 MainThreadRenderingStats(); | 41 MainThreadRenderingStats(); |
| 48 void IssueTraceEvent() const; | 42 void IssueTraceEvent() const; |
| 49 scoped_ptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; | 43 scoped_ptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; |
| 50 void Add(const MainThreadRenderingStats& other); | 44 void Add(const MainThreadRenderingStats& other); |
| 51 }; | 45 }; |
| 52 | 46 |
| 53 struct CC_EXPORT ImplThreadRenderingStats { | 47 struct CC_EXPORT ImplThreadRenderingStats { |
| 54 // Note: when adding new members, please remember to update EnumerateFields | 48 // Note: when adding new members, please remember to update EnumerateFields |
| 55 // and Add in rendering_stats.cc. | 49 // and Add in rendering_stats.cc. |
| 56 | 50 |
| 57 int64 screen_frame_count; | 51 int64 frame_count; |
| 58 int64 dropped_frame_count; | |
| 59 base::TimeDelta rasterize_time; | 52 base::TimeDelta rasterize_time; |
| 60 base::TimeDelta rasterize_time_for_now_bins_on_pending_tree; | |
| 61 base::TimeDelta best_rasterize_time; | |
| 62 int64 rasterized_pixel_count; | 53 int64 rasterized_pixel_count; |
| 63 int64 impl_thread_scroll_count; | |
| 64 int64 main_thread_scroll_count; | |
| 65 int64 drawn_layer_count; | |
| 66 int64 missing_tile_count; | |
| 67 int64 deferred_image_decode_count; | |
| 68 int64 deferred_image_cache_hit_count; | |
| 69 int64 tile_analysis_count; | |
| 70 int64 solid_color_tile_analysis_count; | |
| 71 base::TimeDelta deferred_image_decode_time; | |
| 72 base::TimeDelta tile_analysis_time; | |
| 73 | 54 |
| 74 ImplThreadRenderingStats(); | 55 ImplThreadRenderingStats(); |
| 75 void IssueTraceEvent() const; | 56 void IssueTraceEvent() const; |
| 76 scoped_ptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; | 57 scoped_ptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; |
| 77 void Add(const ImplThreadRenderingStats& other); | 58 void Add(const ImplThreadRenderingStats& other); |
| 78 }; | 59 }; |
| 79 | 60 |
| 80 struct CC_EXPORT RenderingStats { | 61 struct CC_EXPORT RenderingStats { |
| 81 typedef RenderingStatsEnumerator Enumerator; | 62 typedef RenderingStatsEnumerator Enumerator; |
| 82 | 63 |
| 83 MainThreadRenderingStats main_stats; | 64 MainThreadRenderingStats main_stats; |
| 84 ImplThreadRenderingStats impl_stats; | 65 ImplThreadRenderingStats impl_stats; |
| 85 | 66 |
| 86 // Outputs the fields in this structure to the provided enumerator. | 67 // Outputs the fields in this structure to the provided enumerator. |
| 87 void EnumerateFields(Enumerator* enumerator) const; | 68 void EnumerateFields(Enumerator* enumerator) const; |
| 88 | 69 |
| 89 // Add fields of |other| to the fields in this structure. | 70 // Add fields of |other| to the fields in this structure. |
| 90 void Add(const RenderingStats& other); | 71 void Add(const RenderingStats& other); |
| 91 }; | 72 }; |
| 92 | 73 |
| 93 } // namespace cc | 74 } // namespace cc |
| 94 | 75 |
| 95 #endif // CC_DEBUG_RENDERING_STATS_H_ | 76 #endif // CC_DEBUG_RENDERING_STATS_H_ |
| OLD | NEW |