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

Unified Diff: src/gpu/GrGpuResourceCacheAccess.h

Issue 726913002: Revert of Replace GrResourceCache with GrResourceCache2. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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.h » ('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 7417a55a718bcadfefac8a6a084431ace8c9f98e..af5c05464bee057fcb0a9e234de31a9d15a3ae31 100644
--- a/src/gpu/GrGpuResourceCacheAccess.h
+++ b/src/gpu/GrGpuResourceCacheAccess.h
@@ -27,6 +27,25 @@
bool setContentKey(const GrResourceKey& contentKey) {
return fResource->setContentKey(contentKey);
}
+
+ /**
+ * Used by legacy cache to attach a cache entry. This is to be removed soon.
+ */
+ void setCacheEntry(GrResourceCacheEntry* cacheEntry) {
+ // GrResourceCache never changes the cacheEntry once one has been added.
+ SkASSERT(NULL == cacheEntry || NULL == fResource->fCacheEntry);
+ fResource->fCacheEntry = cacheEntry;
+ }
+
+ /**
+ * Is the resource in the legacy cache? This is to be removed soon.
+ */
+ bool isInCache() const { return SkToBool(fResource->fCacheEntry); }
+
+ /**
+ * Returns the cache entry for the legacy cache. This is to be removed soon.
+ */
+ GrResourceCacheEntry* getCacheEntry() const { return fResource->fCacheEntry; }
/**
* Is the resource currently cached as scratch? This means it has a valid scratch key and does
« no previous file with comments | « src/gpu/GrGpuResource.cpp ('k') | src/gpu/GrPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698