Index: src/gpu/GrResourceCache.h |
diff --git a/src/gpu/GrResourceCache.h b/src/gpu/GrResourceCache.h |
index ed2affeae38ae8608fbe58018fa28a7a022ea3fe..2412174121e55422a787eb468622679f2bd119f7 100644 |
--- a/src/gpu/GrResourceCache.h |
+++ b/src/gpu/GrResourceCache.h |
@@ -182,52 +182,7 @@ |
void notifyFlushOccurred(); |
-#if GR_CACHE_STATS |
- struct Stats { |
- int fTotal; |
- int fNumPurgeable; |
- int fNumNonPurgeable; |
- |
- int fScratch; |
- int fExternal; |
- int fBorrowed; |
- int fAdopted; |
- size_t fUnbudgetedSize; |
- |
- Stats() { this->reset(); } |
- |
- void reset() { |
- fTotal = 0; |
- fNumPurgeable = 0; |
- fNumNonPurgeable = 0; |
- fScratch = 0; |
- fExternal = 0; |
- fBorrowed = 0; |
- fAdopted = 0; |
- fUnbudgetedSize = 0; |
- } |
- |
- void update(GrGpuResource* resource) { |
- if (resource->cacheAccess().isScratch()) { |
- ++fScratch; |
- } |
- if (resource->cacheAccess().isExternal()) { |
- ++fExternal; |
- } |
- if (resource->cacheAccess().isBorrowed()) { |
- ++fBorrowed; |
- } |
- if (resource->cacheAccess().isAdopted()) { |
- ++fAdopted; |
- } |
- if (!resource->resourcePriv().isBudgeted()) { |
- fUnbudgetedSize += resource->gpuMemorySize(); |
- } |
- } |
- }; |
- |
- void getStats(Stats*) const; |
- |
+#if GR_GPU_STATS |
void dumpStats(SkString*) const; |
#endif |