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

Unified Diff: include/gpu/GrContext.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 | « bench/GrResourceCacheBench.cpp ('k') | include/gpu/GrGpuResource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrContext.h
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 95fe92c0aec4c22d0e630895305e0b6ca2e0a90e..712eeb83348f99f9dcc34290813bcd5de518e434 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -169,21 +169,21 @@ public:
*/
void purgeAllUnlockedResources();
- /** Sets a content key on the resource. The resource must not already have a content key and
- * the key must not already be in use for this to succeed.
+ /** Sets a unique key on the resource. The resource must not already have a unique key and the
+ * key must not already be in use for this to succeed.
*/
- bool addResourceToCache(const GrContentKey&, GrGpuResource*);
+ bool addResourceToCache(const GrUniqueKey&, GrGpuResource*);
/**
* Finds a resource in the cache, based on the specified key. This is intended for use in
* conjunction with addResourceToCache(). The return value will be NULL if not found. The
* caller must balance with a call to unref().
*/
- GrGpuResource* findAndRefCachedResource(const GrContentKey&);
+ GrGpuResource* findAndRefCachedResource(const GrUniqueKey&);
/** Helper for casting resource to a texture. Caller must be sure that the resource cached
with the key is either NULL or a texture and not another resource type. */
- GrTexture* findAndRefCachedTexture(const GrContentKey& key) {
+ GrTexture* findAndRefCachedTexture(const GrUniqueKey& key) {
GrGpuResource* resource = this->findAndRefCachedResource(key);
if (resource) {
GrTexture* texture = static_cast<GrSurface*>(resource)->asTexture();
@@ -198,7 +198,7 @@ public:
* will not be locked or returned. This call does not affect the priority of
* the resource for deletion.
*/
- bool isResourceInCache(const GrContentKey& key) const;
+ bool isResourceInCache(const GrUniqueKey& key) const;
/**
* Creates a new text rendering context that is optimal for the
« no previous file with comments | « bench/GrResourceCacheBench.cpp ('k') | include/gpu/GrGpuResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698