Index: cc/debug/rendering_stats.h |
diff --git a/cc/debug/rendering_stats.h b/cc/debug/rendering_stats.h |
index bd3b7c7244282fdd6888ae31fc67d0ea41de8758..f11c86a9bffd8de9a70f76c28e8f276c7055c0a0 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" |
@@ -13,8 +15,8 @@ |
namespace cc { |
struct CC_EXPORT MainThreadRenderingStats { |
- // Note: when adding new members, please remember to update EnumerateFields |
- // and Add in rendering_stats.cc. |
+ // Note: when adding new members, please remember to update Add in |
+ // rendering_stats.cc. |
int64 frame_count; |
base::TimeDelta paint_time; |
@@ -23,13 +25,28 @@ struct CC_EXPORT MainThreadRenderingStats { |
int64 recorded_pixel_count; |
MainThreadRenderingStats(); |
+ ~MainThreadRenderingStats(); |
scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; |
void Add(const MainThreadRenderingStats& other); |
}; |
+// Stores a sequence of TimeDelta objects. |
+class CC_EXPORT TimeDeltaList { |
danakj
2014/07/17 14:49:35
can this be a tested class inside ImplThreadRender
ernstm
2014/07/17 15:27:54
This should not be inside ImplThreadRenderingStats
danakj
2014/07/17 15:42:59
Oh, though it's not currently.
Technically this f
Dominik Grewe
2014/07/18 14:27:20
I've nested the classes inside RenderingStats and
|
+ public: |
+ TimeDeltaList(); |
+ ~TimeDeltaList(); |
+ |
+ void Append(base::TimeDelta value); |
+ scoped_ptr<base::ListValue> AsListValueInMilliseconds() const; |
+ void Add(const TimeDeltaList& 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. |
+ // Note: when adding new members, please remember to update Add in |
+ // rendering_stats.cc. |
int64 frame_count; |
base::TimeDelta rasterize_time; |
@@ -38,7 +55,15 @@ struct CC_EXPORT ImplThreadRenderingStats { |
int64 visible_content_area; |
int64 approximated_visible_content_area; |
+ TimeDeltaList draw_duration; |
+ TimeDeltaList draw_duration_estimate; |
+ TimeDeltaList begin_main_frame_to_commit_duration; |
+ TimeDeltaList begin_main_frame_to_commit_duration_estimate; |
+ TimeDeltaList commit_to_activate_duration; |
+ TimeDeltaList commit_to_activate_duration_estimate; |
+ |
ImplThreadRenderingStats(); |
+ ~ImplThreadRenderingStats(); |
scoped_refptr<base::debug::ConvertableToTraceFormat> AsTraceableData() const; |
void Add(const ImplThreadRenderingStats& other); |
}; |