| Index: include/gpu/GrGpuResource.h
|
| diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h
|
| index d726115a7289127e1fd18dcee5810a984774fb8b..a0d3e43ef00c32bec5b86bd98d87a31e00e1e972 100644
|
| --- a/include/gpu/GrGpuResource.h
|
| +++ b/include/gpu/GrGpuResource.h
|
| @@ -15,6 +15,7 @@
|
| class GrContext;
|
| class GrGpu;
|
| class GrResourceCache;
|
| +class SkTraceMemoryDump;
|
|
|
| /**
|
| * Base class for GrGpuResource. Handles the various types of refs we need. Separated out as a base
|
| @@ -252,6 +253,11 @@ public:
|
| */
|
| void abandon();
|
|
|
| + /**
|
| + * Dumps memory usage information for this GrGpuResource to traceMemoryDump.
|
| + **/
|
| + void onMemoryDump(SkTraceMemoryDump* traceMemoryDump) const;
|
| +
|
| protected:
|
| // This must be called by every GrGpuObject. It should be called once the object is fully
|
| // initialized (i.e. not in a base class constructor).
|
| @@ -288,6 +294,13 @@ protected:
|
| **/
|
| void setScratchKey(const GrScratchKey& scratchKey);
|
|
|
| + /**
|
| + * Allows subclasses to add additional backing information to the SkTraceMemoryDump. Called by
|
| + * onMemoryDump. The default implementation adds no backing information.
|
| + **/
|
| + virtual void setMemoryBacking(SkTraceMemoryDump* traceMemoryDump,
|
| + const SkString& dumpName) const {}
|
| +
|
| private:
|
| /**
|
| * Frees the object in the underlying 3D API. Called by CacheAccess.
|
|
|