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

Unified Diff: src/gpu/GrGpuResourcePriv.h

Issue 940463006: Rename GrContentKey to GrUniqueKey (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 5 years, 10 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/GrGpuResourceCacheAccess.h ('k') | src/gpu/GrPath.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpuResourcePriv.h
diff --git a/src/gpu/GrGpuResourcePriv.h b/src/gpu/GrGpuResourcePriv.h
index 520e217e98e44978324c938f9c9a5b4f6f4eb3c7..92c53daf0e2e443a52ae51e1fc5532c64ef1be86 100644
--- a/src/gpu/GrGpuResourcePriv.h
+++ b/src/gpu/GrGpuResourcePriv.h
@@ -18,18 +18,18 @@
class GrGpuResource::ResourcePriv {
public:
/**
- * Sets a content key for the resource. If the resource was previously cached as scratch it will
- * be converted to a content resource. Currently this may only be called once per resource. It
- * fails if there is already a resource with the same content key. TODO: make this supplant the
- * resource that currently is using the content key, allow resources' content keys to change,
- * and allow removal of a content key to convert a resource back to scratch.
+ * Sets a unique key for the resource. If the resource was previously cached as scratch it will
+ * be converted to a uniquely-keyed resource. Currently this may only be called once per
+ * resource. It fails if there is already a resource with the same unique key. TODO: make this
+ * supplant the resource that currently is using the unique key, allow resources' unique keys
+ * to change, and allow removal of a unique key to convert a resource back to scratch.
*/
- bool setContentKey(const GrContentKey& contentKey) {
- return fResource->setContentKey(contentKey);
+ bool setUniqueKey(const GrUniqueKey& key) {
+ return fResource->setUniqueKey(key);
}
- /** Removes the content key from a resource */
- void removeContentKey() { return fResource->removeContentKey(); }
+ /** Removes the unique key from a resource */
+ void removeUniqueKey() { return fResource->removeUniqueKey(); }
/**
* If the resource is uncached make it cached. Has no effect on resources that are wrapped or
@@ -39,7 +39,7 @@ public:
/**
* If the resource is cached make it uncached. Has no effect on resources that are wrapped or
- * already uncached. Furthermore, resources with content keys cannot be made unbudgeted.
+ * already uncached. Furthermore, resources with unique keys cannot be made unbudgeted.
*/
void makeUnbudgeted() { fResource->makeUnbudgeted(); }
@@ -48,14 +48,14 @@ public:
*/
bool isBudgeted() const {
bool ret = GrGpuResource::kCached_LifeCycle == fResource->fLifeCycle;
- SkASSERT(ret || !fResource->getContentKey().isValid());
+ SkASSERT(ret || !fResource->getUniqueKey().isValid());
return ret;
}
/**
* 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 a content resource rather than scratch. Check isScratch().
+ * used as a uniquely keyed resource rather than scratch. Check isScratch().
*/
const GrScratchKey& getScratchKey() const { return fResource->fScratchKey; }
« no previous file with comments | « src/gpu/GrGpuResourceCacheAccess.h ('k') | src/gpu/GrPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698