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

Unified Diff: src/gpu/GrResourceCache2.cpp

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/GrPathRange.cpp ('k') | src/gpu/GrStencilBuffer.h » ('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 1db96ec1cce8352ee468d95372b76b3df287576d..e23f9688acf881691a4861641e28b68d3dff847a 100644
--- a/src/gpu/GrResourceCache2.cpp
+++ b/src/gpu/GrResourceCache2.cpp
@@ -261,10 +261,9 @@ void GrResourceCache2::notifyPurgable(GrGpuResource* resource) {
bool noKey = !resource->cacheAccess().isScratch() &&
(NULL == resource->cacheAccess().getContentKey());
- // Wrapped resources should never have a key.
- SkASSERT(noKey || !resource->cacheAccess().isWrapped());
+ // Only cached resources should ever have a key.
+ SkASSERT(noKey || resource->cacheAccess().isBudgeted());
- // And purge if the resource is wrapped
if (overBudget || noKey) {
SkDEBUGCODE(int beforeCount = fCount;)
resource->cacheAccess().release();
@@ -316,7 +315,6 @@ void GrResourceCache2::didChangeBudgetStatus(GrGpuResource* resource) {
this->validate();
}
-
void GrResourceCache2::internalPurgeAsNeeded() {
SkASSERT(!fPurging);
SkASSERT(!fNewlyPurgableResourceWhilePurging);
« no previous file with comments | « src/gpu/GrPathRange.cpp ('k') | src/gpu/GrStencilBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698