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

Unified Diff: src/gpu/GrResourceCache2.cpp

Issue 894013002: patch from issue 886233004 at patchset 40001 (http://crrev.com/886233004#ps40001) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 months 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/GrResourceCache2.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/GrResourceCache2.cpp
diff --git a/src/gpu/GrResourceCache2.cpp b/src/gpu/GrResourceCache2.cpp
index 99c4270f995f2f31b9bb7bf3a16943ccc25c3261..84a8d48cbc057c5337ca1ddc7dfb137e73b73953 100644
--- a/src/gpu/GrResourceCache2.cpp
+++ b/src/gpu/GrResourceCache2.cpp
@@ -483,43 +483,3 @@ void GrResourceCache2::validate() const {
// SkASSERT(!overBudget || locked == count || fPurging);
}
#endif
-
-#if GR_CACHE_STATS
-void GrResourceCache2::printStats() const {
- this->validate();
-
- int locked = 0;
- int scratch = 0;
- int wrapped = 0;
- size_t unbudgetedSize = 0;
-
- ResourceList::Iter iter;
- GrGpuResource* resource = iter.init(fResources, ResourceList::Iter::kHead_IterStart);
-
- for ( ; resource; resource = iter.next()) {
- if (!resource->isPurgeable()) {
- ++locked;
- }
- if (resource->cacheAccess().isScratch()) {
- ++scratch;
- }
- if (resource->cacheAccess().isWrapped()) {
- ++wrapped;
- }
- if (!resource->cacheAccess().isBudgeted()) {
- unbudgetedSize += resource->gpuMemorySize();
- }
- }
-
- float countUtilization = (100.f * fBudgetedCount) / fMaxCount;
- float byteUtilization = (100.f * fBudgetedBytes) / fMaxBytes;
-
- SkDebugf("Budget: %d items %d bytes\n", fMaxCount, fMaxBytes);
- SkDebugf("\t\tEntry Count: current %d"
- " (%d budgeted, %d wrapped, %d locked, %d scratch %.2g%% full), high %d\n",
- fCount, fBudgetedCount, wrapped, locked, scratch, countUtilization, fHighWaterCount);
- SkDebugf("\t\tEntry Bytes: current %d (budgeted %d, %.2g%% full, %d unbudgeted) high %d\n",
- fBytes, fBudgetedBytes, byteUtilization, unbudgetedSize, fHighWaterBytes);
-}
-
-#endif
« no previous file with comments | « src/gpu/GrResourceCache2.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698