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

Unified Diff: src/gpu/GrGpuResourceCacheAccess.h

Issue 815833004: Add a simpler key type for scratch resource keys. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: final fix Created 6 years 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/GrPath.cpp » ('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 e220e5f263c185e2ff3c0139e77d71029711da88..475317ddb21242ea4c016f178de0e34e96a33a51 100644
--- a/src/gpu/GrGpuResourceCacheAccess.h
+++ b/src/gpu/GrGpuResourceCacheAccess.h
@@ -38,16 +38,15 @@ public:
* not have a content key.
*/
bool isScratch() const {
- SkASSERT(fResource->fScratchKey.isScratch());
- return NULL == this->getContentKey() && !fResource->fScratchKey.isNullScratch();
+ return NULL == this->getContentKey() && fResource->fScratchKey.isValid();
}
/**
* If this resource can be used as a scratch resource this returns a valid scratch key.
* Otherwise it returns a key for which isNullScratch is true. The resource may currently be
- * used as content resource rather than scratch. Check isScratch().
+ * used as a content resource rather than scratch. Check isScratch().
*/
- const GrResourceKey& getScratchKey() const { return fResource->fScratchKey; }
+ const GrScratchKey& getScratchKey() const { return fResource->fScratchKey; }
/**
* If the resource has a scratch key, the key will be removed. Since scratch keys are installed
« no previous file with comments | « src/gpu/GrGpuResource.cpp ('k') | src/gpu/GrPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698