diff options
author | ericrk <ericrk@chromium.org> | 2015-09-15 14:16:10 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-15 14:16:10 -0700 |
commit | 0a5fa484fd58d27088f8696bdc11c8cc8f2b4866 (patch) | |
tree | 3b4559d7da20b1de45b1a537378c8a36bca75511 /src/gpu/GrResourceCache.h | |
parent | eb00eaba0cb0be4ba39a7c00b6be8347136ce4ae (diff) | |
download | platform_external_skqp-0a5fa484fd58d27088f8696bdc11c8cc8f2b4866.tar.gz platform_external_skqp-0a5fa484fd58d27088f8696bdc11c8cc8f2b4866.tar.bz2 platform_external_skqp-0a5fa484fd58d27088f8696bdc11c8cc8f2b4866.zip |
Add onMemoryDump to GrContext
Adds an entry point to GrContext to allow enumeration and tracing of GPU resources
via the newly added SkTraceMemoryDump.
Plan is for Chrome to call this on each of its GrContexts.
Dumps both the total size of GPU resources, as well as the total purgeable size.
BUG=526261
Review URL: https://codereview.chromium.org/1313743002
Diffstat (limited to 'src/gpu/GrResourceCache.h')
-rw-r--r-- | src/gpu/GrResourceCache.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gpu/GrResourceCache.h b/src/gpu/GrResourceCache.h index 2171420a43..2412174121 100644 --- a/src/gpu/GrResourceCache.h +++ b/src/gpu/GrResourceCache.h @@ -22,6 +22,7 @@ class GrCaps; class SkString; +class SkTraceMemoryDump; /** * Manages the lifetime of all GrGpuResource instances. @@ -178,7 +179,7 @@ public: fOverBudgetCB = overBudgetCB; fOverBudgetData = data; } - + void notifyFlushOccurred(); #if GR_GPU_STATS @@ -188,6 +189,9 @@ public: // This function is for unit testing and is only defined in test tools. void changeTimestamp(uint32_t newTimestamp); + // Enumerates all cached resources and dumps their details to traceMemoryDump. + void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const; + private: /////////////////////////////////////////////////////////////////////////// /// @name Methods accessible via ResourceAccess |