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

Unified Diff: src/gpu/GrResourceCache.h

Issue 1862043002: Refactor to separate backend object lifecycle and GpuResource budget decision (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix unrelated GrBuffer::onGpuMemorySize() lack of override keyword compile error Created 4 years, 8 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/GrPathRange.cpp ('k') | src/gpu/GrResourceCache.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 5939c518772c101699d45d95ace18febe95c96e1..6c64ddc9333a6ce8301698028abcb1f80206004a 100644
--- a/src/gpu/GrResourceCache.h
+++ b/src/gpu/GrResourceCache.h
@@ -188,9 +188,7 @@ public:
int fNumNonPurgeable;
int fScratch;
- int fExternal;
- int fBorrowed;
- int fAdopted;
+ int fWrapped;
size_t fUnbudgetedSize;
Stats() { this->reset(); }
@@ -200,9 +198,7 @@ public:
fNumPurgeable = 0;
fNumNonPurgeable = 0;
fScratch = 0;
- fExternal = 0;
- fBorrowed = 0;
- fAdopted = 0;
+ fWrapped = 0;
fUnbudgetedSize = 0;
}
@@ -210,14 +206,8 @@ public:
if (resource->cacheAccess().isScratch()) {
++fScratch;
}
- if (resource->resourcePriv().isExternal()) {
- ++fExternal;
- }
- if (resource->cacheAccess().isBorrowed()) {
- ++fBorrowed;
- }
- if (resource->cacheAccess().isAdopted()) {
- ++fAdopted;
+ if (resource->resourcePriv().refsWrappedObjects()) {
+ ++fWrapped;
}
if (SkBudgeted::kNo == resource->resourcePriv().isBudgeted()) {
fUnbudgetedSize += resource->gpuMemorySize();
« no previous file with comments | « src/gpu/GrPathRange.cpp ('k') | src/gpu/GrResourceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698