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

Unified Diff: src/gpu/GrGpuResource.cpp

Issue 703303003: Add GrGpuResource::CacheAccess (Closed) Base URL: https://skia.googlesource.com/skia.git@nohash
Patch Set: fix warning 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/GrContext.cpp ('k') | src/gpu/GrGpuResourceCacheAccess.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpuResource.cpp
diff --git a/src/gpu/GrGpuResource.cpp b/src/gpu/GrGpuResource.cpp
index d4728452fb1c8ac634ef79011a564dcbcbb38a02..79ea52f3bce82f716d3d287390e0671ec36aa386 100644
--- a/src/gpu/GrGpuResource.cpp
+++ b/src/gpu/GrGpuResource.cpp
@@ -98,12 +98,6 @@ bool GrGpuResource::setContentKey(const GrResourceKey& contentKey) {
return true;
}
-void GrGpuResource::setCacheEntry(GrResourceCacheEntry* cacheEntry) {
- // GrResourceCache never changes the cacheEntry once one has been added.
- SkASSERT(NULL == cacheEntry || NULL == fCacheEntry);
- fCacheEntry = cacheEntry;
-}
-
void GrGpuResource::notifyIsPurgable() const {
if (fCacheEntry && !this->wasDestroyed()) {
get_resource_cache(fGpu)->notifyPurgable(this);
@@ -117,18 +111,6 @@ void GrGpuResource::setScratchKey(const GrResourceKey& scratchKey) {
fScratchKey = scratchKey;
}
-const GrResourceKey* GrGpuResource::getContentKey() const {
- if (fContentKeySet) {
- return &fContentKey;
- }
- return NULL;
-}
-
-bool GrGpuResource::isScratch() const {
- SkASSERT(fScratchKey.isScratch());
- return NULL == this->getContentKey() && !fScratchKey.isNullScratch();
-}
-
uint32_t GrGpuResource::CreateUniqueID() {
static int32_t gUniqueID = SK_InvalidUniqueID;
uint32_t id;
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrGpuResourceCacheAccess.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698