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 |