Index: src/gpu/GrResourceCache.cpp |
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp |
index e77d9acd62ff37f0fd0eb1b05b1250da3d35a920..c6c2eee0d0bed3ba1269609a26d16c317c523306 100644 |
--- a/src/gpu/GrResourceCache.cpp |
+++ b/src/gpu/GrResourceCache.cpp |
@@ -564,7 +564,7 @@ uint32_t GrResourceCache::getNextTimestamp() { |
int currP = 0; |
int currNP = 0; |
while (currP < sortedPurgeableResources.count() && |
- currNP < fNonpurgeableResources.count()) { |
+ currNP < fNonpurgeableResources.count()) { |
uint32_t tsP = sortedPurgeableResources[currP]->cacheAccess().timestamp(); |
uint32_t tsNP = fNonpurgeableResources[currNP]->cacheAccess().timestamp(); |
SkASSERT(tsP != tsNP); |
@@ -596,10 +596,10 @@ uint32_t GrResourceCache::getNextTimestamp() { |
// count should be the next timestamp we return. |
SkASSERT(fTimestamp == SkToU32(count)); |
- |
+ |
// The historical timestamps of flushes are now invalid. |
this->resetFlushTimestamps(); |
- } |
+ } |
} |
return fTimestamp++; |
} |
@@ -616,6 +616,15 @@ void GrResourceCache::notifyFlushOccurred() { |
} |
} |
+void GrResourceCache::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { |
+ for (int i = 0; i < fNonpurgeableResources.count(); ++i) { |
+ fNonpurgeableResources[i]->dumpMemoryStatistics(traceMemoryDump); |
+ } |
+ for (int i = 0; i < fPurgeableQueue.count(); ++i) { |
+ fPurgeableQueue.at(i)->dumpMemoryStatistics(traceMemoryDump); |
+ } |
+} |
+ |
#ifdef SK_DEBUG |
void GrResourceCache::validate() const { |
// Reduce the frequency of validations for large resource counts. |