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

Unified Diff: src/gpu/GrGpuResourceCacheAccess.h

Issue 846303002: Make uncached textures uncached from the get go. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add comment 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/GrGpuResource.cpp ('k') | src/gpu/GrIndexBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpuResourceCacheAccess.h
diff --git a/src/gpu/GrGpuResourceCacheAccess.h b/src/gpu/GrGpuResourceCacheAccess.h
index 475317ddb21242ea4c016f178de0e34e96a33a51..0aadb89d979e81bec0cc0801139ac40e924caf69 100644
--- a/src/gpu/GrGpuResourceCacheAccess.h
+++ b/src/gpu/GrGpuResourceCacheAccess.h
@@ -29,11 +29,6 @@ public:
}
/**
- * Changes whether the resource counts against the resource cache budget.
- */
- void setBudgeted(bool countsAgainstBudget) { fResource->setBudgeted(countsAgainstBudget); }
-
- /**
* Is the resource currently cached as scratch? This means it has a valid scratch key and does
* not have a content key.
*/
@@ -67,16 +62,12 @@ public:
/**
* Is the resource object wrapping an externally allocated GPU resource?
*/
- bool isWrapped() const { return fResource->isWrapped(); }
+ bool isWrapped() const { return GrGpuResource::kWrapped_LifeCycle == fResource->fLifeCycle; }
/**
* Does the resource count against the resource budget?
*/
- bool isBudgeted() const {
- bool ret = SkToBool(GrGpuResource::kBudgeted_Flag & fResource->fFlags);
- SkASSERT(!(ret && fResource->isWrapped()));
- return ret;
- }
+ bool isBudgeted() const { return GrGpuResource::kCached_LifeCycle == fResource->fLifeCycle; }
/**
* Called by the cache to delete the resource under normal circumstances.
« no previous file with comments | « src/gpu/GrGpuResource.cpp ('k') | src/gpu/GrIndexBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698