Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4483)

Unified Diff: cc/debug/rendering_stats.h

Issue 363003002: Add duration estimation data to RenderingStats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: LTHI forwards estimates to rendering stats. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/debug/rendering_stats.cc » ('j') | cc/debug/rendering_stats.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
ernstm 2014/07/14 13:12:39 If we expect to use more of these list values in t
Dominik Grewe 2014/07/14 13:37:52 Good point. Done.
+ 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);
« no previous file with comments | « no previous file | cc/debug/rendering_stats.cc » ('j') | cc/debug/rendering_stats.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698