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

Unified Diff: cc/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: 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 | « no previous file | cc/rendering_stats.cc » ('j') | content/renderer/gpu/gpu_benchmarking_extension.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/rendering_stats.h
diff --git a/cc/rendering_stats.h b/cc/rendering_stats.h
index 995819c645d7d6940bd484fc7c5fc86e935b4be2..92ffcab6858914fb56d10c453cf6c55b6ad1c7f0 100644
--- a/cc/rendering_stats.h
+++ b/cc/rendering_stats.h
@@ -26,6 +26,22 @@ struct CC_EXPORT RenderingStats {
int64 numLayersInLayerTree;
nduca 2012/11/28 21:27:35 Put a comment up here that reminds folks who add f
hartmanng 2012/11/28 23:18:17 Done.
RenderingStats();
+
+ // 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 addInt64(const char* name, int64 value) = 0;
+ virtual void addDouble(const char* name, double value) = 0;
+
+ protected:
+ virtual ~Enumerator() { }
+ };
+
+ // Outputs the fields in this structure to the provided enumerator.
+ void enumerateFields(Enumerator* enumerator) const;
};
} // namespace cc
« no previous file with comments | « no previous file | cc/rendering_stats.cc » ('j') | content/renderer/gpu/gpu_benchmarking_extension.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698