diff options
author | bsalomon <bsalomon@google.com> | 2014-11-14 06:47:39 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-14 06:47:39 -0800 |
commit | ac49acda520292b059bc37fd368dff912626c3d9 (patch) | |
tree | 64b8e7e0e2471aac0c27f0eb947c4a4f9dc0a4b3 /src/gpu/GrGpuResourceCacheAccess.h | |
parent | 407aa584d183c1bf314f5defd1cf0202e8a96c89 (diff) |
Revert of Replace GrResourceCache with GrResourceCache2. (patchset #7 id:120001 of https://codereview.chromium.org/716143004/)
Reason for revert:
broken again
Original issue's description:
> Replace GrResourceCache with GrResourceCache2.
>
> BUG=skia:2889
>
> Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6
>
> Committed: https://skia.googlesource.com/skia/+/407aa584d183c1bf314f5defd1cf0202e8a96c89
TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2889
Review URL: https://codereview.chromium.org/726913002
Diffstat (limited to 'src/gpu/GrGpuResourceCacheAccess.h')
-rw-r--r-- | src/gpu/GrGpuResourceCacheAccess.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gpu/GrGpuResourceCacheAccess.h b/src/gpu/GrGpuResourceCacheAccess.h index 7417a55a71..af5c05464b 100644 --- a/src/gpu/GrGpuResourceCacheAccess.h +++ b/src/gpu/GrGpuResourceCacheAccess.h @@ -29,6 +29,25 @@ public: } /** + * 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 * not have a content key. */ |