| Index: cc/rendering_stats.h
|
| diff --git a/cc/rendering_stats.h b/cc/rendering_stats.h
|
| index 995819c645d7d6940bd484fc7c5fc86e935b4be2..4bb4edd2550e829a4ec4ecac3d4ecdeec506fc0e 100644
|
| --- a/cc/rendering_stats.h
|
| +++ b/cc/rendering_stats.h
|
| @@ -24,8 +24,26 @@ struct CC_EXPORT RenderingStats {
|
| int64 numImplThreadScrolls;
|
| int64 numMainThreadScrolls;
|
| int64 numLayersInLayerTree;
|
| + // Note: when adding new members, please remember to update enumerateFields
|
| + // in rendering_stats.cc.
|
|
|
| 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
|
|
|