Chromium Code Reviews| 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 13 matching lines...) Expand all Loading... | |
| 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; | 31 base::TimeDelta GetLastTimeDelta() const; |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 std::list<base::TimeDelta> values; | 34 std::vector<base::TimeDelta> values; |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 struct CC_EXPORT MainThreadRenderingStats { | 37 // Note: when adding new members, please remember to update Add in |
| 38 // Note: when adding new members, please remember to update Add in | 38 // rendering_stats.cc. |
| 39 // rendering_stats.cc. | |
| 40 | 39 |
| 41 base::TimeDelta paint_time; | 40 int64 frame_count = 0; |
|
vmpstr
2014/11/07 19:57:32
Is this allowed?
| |
| 42 int64 painted_pixel_count; | 41 int64 visible_content_area = 0; |
| 43 base::TimeDelta record_time; | 42 int64 approximated_visible_content_area = 0; |
| 44 int64 recorded_pixel_count; | |
| 45 | 43 |
| 46 MainThreadRenderingStats(); | 44 TimeDeltaList draw_duration; |
| 47 ~MainThreadRenderingStats(); | 45 TimeDeltaList draw_duration_estimate; |
| 48 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() | 46 TimeDeltaList begin_main_frame_to_commit_duration; |
| 49 const; | 47 TimeDeltaList begin_main_frame_to_commit_duration_estimate; |
| 50 void Add(const MainThreadRenderingStats& other); | 48 TimeDeltaList commit_to_activate_duration; |
| 51 }; | 49 TimeDeltaList commit_to_activate_duration_estimate; |
| 52 | 50 |
| 53 struct CC_EXPORT ImplThreadRenderingStats { | 51 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; |
| 54 // Note: when adding new members, please remember to update Add in | |
| 55 // rendering_stats.cc. | |
| 56 | |
| 57 int64 frame_count; | |
| 58 int64 visible_content_area; | |
| 59 int64 approximated_visible_content_area; | |
| 60 | |
| 61 TimeDeltaList draw_duration; | |
| 62 TimeDeltaList draw_duration_estimate; | |
| 63 TimeDeltaList begin_main_frame_to_commit_duration; | |
| 64 TimeDeltaList begin_main_frame_to_commit_duration_estimate; | |
| 65 TimeDeltaList commit_to_activate_duration; | |
| 66 TimeDeltaList commit_to_activate_duration_estimate; | |
| 67 | |
| 68 ImplThreadRenderingStats(); | |
| 69 ~ImplThreadRenderingStats(); | |
| 70 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() | |
| 71 const; | |
| 72 void Add(const ImplThreadRenderingStats& other); | |
| 73 }; | |
| 74 | |
| 75 MainThreadRenderingStats main_stats; | |
| 76 ImplThreadRenderingStats impl_stats; | |
| 77 | |
| 78 // Add fields of |other| to the fields in this structure. | |
| 79 void Add(const RenderingStats& other); | 52 void Add(const RenderingStats& other); |
| 80 }; | 53 }; |
| 81 | 54 |
| 82 } // namespace cc | 55 } // namespace cc |
| 83 | 56 |
| 84 #endif // CC_DEBUG_RENDERING_STATS_H_ | 57 #endif // CC_DEBUG_RENDERING_STATS_H_ |
| OLD | NEW |