| 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; |
| 41 base::TimeDelta record_time; | 43 base::TimeDelta record_time; |
| 42 int64 recorded_pixel_count; | 44 int64 recorded_pixel_count; |
| 43 | 45 |
| 44 MainThreadRenderingStats(); | 46 MainThreadRenderingStats(); |
| 45 ~MainThreadRenderingStats(); | 47 ~MainThreadRenderingStats(); |
| 46 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() | 48 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() |
| 47 const; | 49 const; |
| 48 void Add(const MainThreadRenderingStats& other); | 50 void Add(const MainThreadRenderingStats& other); |
| 49 }; | 51 }; |
| 50 | 52 |
| 51 struct CC_EXPORT ImplThreadRenderingStats { | 53 struct CC_EXPORT ImplThreadRenderingStats { |
| 52 // Note: when adding new members, please remember to update Add in | 54 // Note: when adding new members, please remember to update Add in |
| 53 // rendering_stats.cc. | 55 // rendering_stats.cc. |
| 54 | 56 |
| 55 int64 frame_count; | 57 int64 frame_count; |
| 56 base::TimeDelta rasterize_time; | |
| 57 base::TimeDelta analysis_time; | |
| 58 int64 rasterized_pixel_count; | |
| 59 int64 visible_content_area; | 58 int64 visible_content_area; |
| 60 int64 approximated_visible_content_area; | 59 int64 approximated_visible_content_area; |
| 61 | 60 |
| 62 TimeDeltaList draw_duration; | 61 TimeDeltaList draw_duration; |
| 63 TimeDeltaList draw_duration_estimate; | 62 TimeDeltaList draw_duration_estimate; |
| 64 TimeDeltaList begin_main_frame_to_commit_duration; | 63 TimeDeltaList begin_main_frame_to_commit_duration; |
| 65 TimeDeltaList begin_main_frame_to_commit_duration_estimate; | 64 TimeDeltaList begin_main_frame_to_commit_duration_estimate; |
| 66 TimeDeltaList commit_to_activate_duration; | 65 TimeDeltaList commit_to_activate_duration; |
| 67 TimeDeltaList commit_to_activate_duration_estimate; | 66 TimeDeltaList commit_to_activate_duration_estimate; |
| 68 | 67 |
| 69 ImplThreadRenderingStats(); | 68 ImplThreadRenderingStats(); |
| 70 ~ImplThreadRenderingStats(); | 69 ~ImplThreadRenderingStats(); |
| 71 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() | 70 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() |
| 72 const; | 71 const; |
| 73 void Add(const ImplThreadRenderingStats& other); | 72 void Add(const ImplThreadRenderingStats& other); |
| 74 }; | 73 }; |
| 75 | 74 |
| 76 MainThreadRenderingStats main_stats; | 75 MainThreadRenderingStats main_stats; |
| 77 ImplThreadRenderingStats impl_stats; | 76 ImplThreadRenderingStats impl_stats; |
| 78 | 77 |
| 79 // Add fields of |other| to the fields in this structure. | 78 // Add fields of |other| to the fields in this structure. |
| 80 void Add(const RenderingStats& other); | 79 void Add(const RenderingStats& other); |
| 81 }; | 80 }; |
| 82 | 81 |
| 83 } // namespace cc | 82 } // namespace cc |
| 84 | 83 |
| 85 #endif // CC_DEBUG_RENDERING_STATS_H_ | 84 #endif // CC_DEBUG_RENDERING_STATS_H_ |
| OLD | NEW |