| Index: gpu/config/gpu_info.h
|
| diff --git a/gpu/config/gpu_info.h b/gpu/config/gpu_info.h
|
| index 98ab80ca300f0e44a0ae83fa1d1a413946fe9e8f..b2c019a3284ec4c7890ee39cdcee8d6a6b5f638e 100644
|
| --- a/gpu/config/gpu_info.h
|
| +++ b/gpu/config/gpu_info.h
|
| @@ -140,6 +140,32 @@ struct GPU_EXPORT GPUInfo {
|
| // The information returned by the DirectX Diagnostics Tool.
|
| DxDiagNode dx_diagnostics;
|
| #endif
|
| + // Note: when adding new members, please remember to update EnumerateFields
|
| + // in gpu_info.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 AddInt64(const char* name, int64 value) = 0;
|
| + virtual void AddInt(const char* name, int value) = 0;
|
| + virtual void AddString(const char* name, const std::string& value) = 0;
|
| + virtual void AddBool(const char* name, bool value) = 0;
|
| + virtual void AddTimeDeltaInSecondsF(const char* name,
|
| + const base::TimeDelta& value) = 0;
|
| +
|
| + // First call is for the primary GPU; subsequent calls are for the
|
| + // secondary GPUs.
|
| + virtual void AddGPUDevice(const GPUDevice& device) = 0;
|
| +
|
| + protected:
|
| + virtual ~Enumerator() {}
|
| + };
|
| +
|
| + // Outputs the fields in this structure to the provided enumerator.
|
| + void EnumerateFields(Enumerator* enumerator) const;
|
| };
|
|
|
| } // namespace gpu
|
|
|