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

Unified Diff: src/gpu/GrResourceCache2.h

Issue 858123002: Add specialized content key class for resources. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove default template arg 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/GrPath.cpp ('k') | src/gpu/GrResourceCache2.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrResourceCache2.h
diff --git a/src/gpu/GrResourceCache2.h b/src/gpu/GrResourceCache2.h
index 5733cff66460bc476fe24560c7528141122b51c7..5aee1add86cc7f055314d5763cb883e912a50e50 100644
--- a/src/gpu/GrResourceCache2.h
+++ b/src/gpu/GrResourceCache2.h
@@ -110,7 +110,7 @@ public:
/**
* Find a resource that matches a content key.
*/
- GrGpuResource* findAndRefContentResource(const GrResourceKey& contentKey) {
+ GrGpuResource* findAndRefContentResource(const GrContentKey& contentKey) {
GrGpuResource* resource = fContentHash.find(contentKey);
if (resource) {
resource->ref();
@@ -122,7 +122,7 @@ public:
/**
* Query whether a content key exists in the cache.
*/
- bool hasContentKey(const GrResourceKey& contentKey) const {
+ bool hasContentKey(const GrContentKey& contentKey) const {
return SkToBool(fContentHash.find(contentKey));
}
@@ -193,13 +193,13 @@ private:
typedef SkTMultiMap<GrGpuResource, GrScratchKey, ScratchMapTraits> ScratchMap;
struct ContentHashTraits {
- static const GrResourceKey& GetKey(const GrGpuResource& r) {
- return *r.cacheAccess().getContentKey();
+ static const GrContentKey& GetKey(const GrGpuResource& r) {
+ return r.cacheAccess().getContentKey();
}
- static uint32_t Hash(const GrResourceKey& key) { return key.getHash(); }
+ static uint32_t Hash(const GrContentKey& key) { return key.hash(); }
};
- typedef SkTDynamicHash<GrGpuResource, GrResourceKey, ContentHashTraits> ContentHash;
+ typedef SkTDynamicHash<GrGpuResource, GrContentKey, ContentHashTraits> ContentHash;
typedef SkTInternalLList<GrGpuResource> ResourceList;
« no previous file with comments | « src/gpu/GrPath.cpp ('k') | src/gpu/GrResourceCache2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698