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

Unified Diff: content/common/gpu/gpu_rendering_stats.h

Issue 11280210: Move RenderStats enumeration out of gpu_benchmarking_extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updating gpu_rendering_stats. Created 8 years, 1 month 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 | « cc/rendering_stats.cc ('k') | content/common/gpu/gpu_rendering_stats.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_rendering_stats.h
diff --git a/content/common/gpu/gpu_rendering_stats.h b/content/common/gpu/gpu_rendering_stats.h
index e7cad9160439626ba8d05f71e964d1be06cf4539..ffea57b360d722c0197afb2ca909c48f03d9f0c5 100644
--- a/content/common/gpu/gpu_rendering_stats.h
+++ b/content/common/gpu/gpu_rendering_stats.h
@@ -20,6 +20,25 @@ struct CONTENT_EXPORT GpuRenderingStats {
base::TimeDelta total_texture_upload_time;
base::TimeDelta global_total_processing_commands_time;
base::TimeDelta total_processing_commands_time;
+ // Note: when adding new members, please remember to update enumerateFields
+ // in gpu_rendering_stats.cc.
+
+ // In conjunction with enumerateFields, this allows the embedder to
+ // enumerate the values in this structure without
+ // having to embed references to its specific member variables. This
+ // simplifies the addition of new fields to this type.
+ class Enumerator {
+ public:
+ virtual void addInt(const char* name, int value) = 0;
piman 2012/11/28 23:23:17 nit: chrome style for function names
+ virtual void addTimeDeltaInSecondsF(const char* name,
+ const base::TimeDelta& value) = 0;
+
+ protected:
+ virtual ~Enumerator() { }
+ };
+
+ // Outputs the fields in this structure to the provided enumerator.
+ void enumerateFields(Enumerator* enumerator) const;
};
} // namespace content
« no previous file with comments | « cc/rendering_stats.cc ('k') | content/common/gpu/gpu_rendering_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698