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

Unified Diff: src/gpu/GrResourceCache.h

Issue 1413483004: Revert of Update Layer Hoisting to store its atlas texture in the resource cache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 | « src/gpu/GrRectanizer_skyline.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/gpu/GrRectanizer_skyline.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698