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

Unified Diff: src/gpu/GrResourceCache2.cpp

Issue 642493003: Revert of Use presence of a content key as non-scratch indicator (Closed) Base URL: https://skia.googlesource.com/skia.git@pp
Patch Set: Created 6 years, 2 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/GrResourceCache.cpp ('k') | no next file » | 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 76673cf9f95453cbed8a6fd3f81093d556ca2bff..85e66a7642ad45ea373eded4ef9c878fcb4ea181 100644
--- a/src/gpu/GrResourceCache2.cpp
+++ b/src/gpu/GrResourceCache2.cpp
@@ -67,15 +67,15 @@
// either by drawing code or for pending io operations.
// This will be removed when flush no longer creates resources.
return resource->reffedOnlyByCache() && !resource->internalHasPendingIO() &&
- (NULL == resource->getContentKey());
+ GrGpuResource::kYes_IsScratch == resource->fIsScratch;
} else {
// Because duties are currently shared between GrResourceCache and GrResourceCache2, the
// current interpretation of this rule is that only GrResourceCache has a ref but that
// it has been marked as a scratch resource.
- return resource->reffedOnlyByCache() && (NULL == resource->getContentKey());
+ return resource->reffedOnlyByCache() &&
+ GrGpuResource::kYes_IsScratch == resource->fIsScratch;
}
}
-
private:
bool fFlushing;
};
« no previous file with comments | « src/gpu/GrResourceCache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698