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

Unified Diff: src/gpu/GrGpuResource.cpp

Issue 703303003: Add GrGpuResource::CacheAccess (Closed) Base URL: https://skia.googlesource.com/skia.git@nohash
Patch Set: update 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
Index: src/gpu/GrGpuResource.cpp
diff --git a/src/gpu/GrGpuResource.cpp b/src/gpu/GrGpuResource.cpp
index 87c7349246aca003fb8cc86985e74d2a304e325d..124f99a054686f6452d21e3f70d07f60a7a9b2d4 100644
--- a/src/gpu/GrGpuResource.cpp
+++ b/src/gpu/GrGpuResource.cpp
@@ -99,12 +99,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);
@@ -118,18 +112,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;

Powered by Google App Engine
This is Rietveld 408576698