Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Unified Diff: include/gpu/GrGpuResource.h

Issue 1302663003: Sample for GPU memory dumping using new SkTraceMemoryDump. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/core/SkTraceMemoryDump.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrGpuResource.h
diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h
index d726115a7289127e1fd18dcee5810a984774fb8b..77df7d7a79b0e1e882339a29c5dc002ca2f046ec 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
@@ -138,7 +139,7 @@ private:
*/
class SK_API GrGpuResource : public GrIORef<GrGpuResource> {
public:
-
+
enum LifeCycle {
/**
@@ -252,6 +253,12 @@ public:
*/
void abandon();
+ /**
+ * Dumps details about this GrGpuResource to the provided traceMemoryDump.
+ * May be overridden by subclasses to provide more detailed dumps.
+ **/
+ virtual 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).
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/core/SkTraceMemoryDump.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698