Index: src/gpu/GrResourceCache.h |
diff --git a/src/gpu/GrResourceCache.h b/src/gpu/GrResourceCache.h |
index 809c4f491e0ae3ba857cfc6668036dc61966d453..fb36f8aaf4c9c7c247db9e6e47ab75c50dfcd288 100644 |
--- a/src/gpu/GrResourceCache.h |
+++ b/src/gpu/GrResourceCache.h |
@@ -21,6 +21,7 @@ |
#include "SkTMultiMap.h" |
class SkString; |
+class SkTraceMemoryDump; |
/** |
* Manages the lifetime of all GrGpuResource instances. |
@@ -129,7 +130,7 @@ public: |
GrGpuResource* findAndRefScratchResource(const GrScratchKey& scratchKey, |
size_t resourceSize, |
uint32_t flags); |
- |
+ |
#ifdef SK_DEBUG |
// This is not particularly fast and only used for validation, so debug only. |
int countScratchEntriesForKey(const GrScratchKey& scratchKey) const { |
@@ -177,7 +178,7 @@ public: |
fOverBudgetCB = overBudgetCB; |
fOverBudgetData = data; |
} |
- |
+ |
void notifyFlushOccurred(); |
#if GR_GPU_STATS |
@@ -187,6 +188,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 onMemoryDump(SkTraceMemoryDump* traceMemoryDump) const; |
+ |
private: |
/////////////////////////////////////////////////////////////////////////// |
/// @name Methods accessible via ResourceAccess |
@@ -209,7 +213,7 @@ private: |
bool overBudget() const { return fBudgetedBytes > fMaxBytes || fBudgetedCount > fMaxCount; } |
bool wouldFit(size_t bytes) { |
- return fBudgetedBytes+bytes <= fMaxBytes && fBudgetedCount+1 <= fMaxCount; |
+ return fBudgetedBytes+bytes <= fMaxBytes && fBudgetedCount+1 <= fMaxCount; |
} |
uint32_t getNextTimestamp(); |