Chromium Code Reviews| Index: cc/debug/rendering_stats.h |
| diff --git a/cc/debug/rendering_stats.h b/cc/debug/rendering_stats.h |
| index bd3b7c7244282fdd6888ae31fc67d0ea41de8758..f0ee8e106a14a16534ef245e5f4208a4625c3306 100644 |
| --- a/cc/debug/rendering_stats.h |
| +++ b/cc/debug/rendering_stats.h |
| @@ -5,6 +5,8 @@ |
| #ifndef CC_DEBUG_RENDERING_STATS_H_ |
| #define CC_DEBUG_RENDERING_STATS_H_ |
| +#include <list> |
| + |
| #include "base/basictypes.h" |
| #include "base/time/time.h" |
| #include "cc/base/cc_export.h" |
| @@ -27,6 +29,17 @@ struct CC_EXPORT MainThreadRenderingStats { |
| void Add(const MainThreadRenderingStats& other); |
| }; |
| +// Stores a sequence of TimeDelta objects. |
| +class CC_EXPORT ImplThreadRenderingStatsAccumulated { |
|
brianderson
2014/07/07 20:01:42
What's the plan for how to process/display/use the
Dominik Grewe
2014/07/07 20:42:32
Potentially several things:
1) Add a metric to Te
brianderson
2014/07/07 21:43:14
How would we get the list of timestamps out? I kno
|
| + public: |
| + void Append(base::TimeDelta value); |
| + scoped_ptr<base::Value> AsValueInMilliseconds() const; |
| + void Add(const ImplThreadRenderingStatsAccumulated& other); |
| + |
| + private: |
| + std::list<base::TimeDelta> values; |
| +}; |
| + |
| struct CC_EXPORT ImplThreadRenderingStats { |
| // Note: when adding new members, please remember to update EnumerateFields |
| // and Add in rendering_stats.cc. |
| @@ -38,6 +51,14 @@ struct CC_EXPORT ImplThreadRenderingStats { |
| int64 visible_content_area; |
| int64 approximated_visible_content_area; |
| + ImplThreadRenderingStatsAccumulated draw_duration; |
| + ImplThreadRenderingStatsAccumulated draw_duration_estimate; |
| + ImplThreadRenderingStatsAccumulated begin_main_frame_to_commit_duration; |
| + ImplThreadRenderingStatsAccumulated |
| + begin_main_frame_to_commit_duration_estimate; |
| + ImplThreadRenderingStatsAccumulated commit_to_activate_duration; |
| + ImplThreadRenderingStatsAccumulated commit_to_activate_duration_estimate; |
| + |
| ImplThreadRenderingStats(); |
| scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; |
| void Add(const ImplThreadRenderingStats& other); |