| 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..c2b919155b19dbb70566128a64df6de862d6c4af 100644
|
| --- a/content/common/gpu/gpu_rendering_stats.h
|
| +++ b/content/common/gpu/gpu_rendering_stats.h
|
| @@ -20,6 +20,30 @@ struct CONTENT_EXPORT GpuRenderingStats {
|
| base::TimeDelta total_texture_upload_time;
|
| base::TimeDelta global_total_processing_commands_time;
|
| base::TimeDelta total_processing_commands_time;
|
| +
|
| + // 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;
|
| + virtual void addTimeDelta(const char* name, base::TimeDelta value) = 0;
|
| + protected:
|
| + virtual ~Enumerator() { }
|
| + };
|
| +
|
| + // Outputs the fields in this structure to the provided enumerator.
|
| + void enumerateFields(Enumerator* enumerator) const {
|
| + enumerator->addInt("globalTextureUploadCount", global_texture_upload_count);
|
| + enumerator->addTimeDelta("totalTextureUploadTime",
|
| + total_texture_upload_time);
|
| + enumerator->addInt("textureUploadCount", texture_upload_count);
|
| + enumerator->addTimeDelta("globalTotalProcessingCommandsTime",
|
| + global_total_processing_commands_time);
|
| + enumerator->addTimeDelta("totalProcessingCommandsTime",
|
| + total_processing_commands_time);
|
| + }
|
| };
|
|
|
| } // namespace content
|
|
|