Index: src/gpu/GrResourceCache2.cpp |
diff --git a/src/gpu/GrResourceCache2.cpp b/src/gpu/GrResourceCache2.cpp |
index 99c4270f995f2f31b9bb7bf3a16943ccc25c3261..65894d33141213c614491072acac28eb215a56e6 100644 |
--- a/src/gpu/GrResourceCache2.cpp |
+++ b/src/gpu/GrResourceCache2.cpp |
@@ -132,8 +132,8 @@ |
if (resource->cacheAccess().getScratchKey().isValid()) { |
fScratchMap.remove(resource->cacheAccess().getScratchKey(), resource); |
} |
- if (resource->getContentKey().isValid()) { |
- fContentHash.remove(resource->getContentKey()); |
+ if (resource->cacheAccess().getContentKey().isValid()) { |
+ fContentHash.remove(resource->cacheAccess().getContentKey()); |
} |
this->validate(); |
} |
@@ -225,9 +225,9 @@ |
SkASSERT(!fPurging); |
SkASSERT(resource); |
SkASSERT(this->isInCache(resource)); |
- SkASSERT(resource->getContentKey().isValid()); |
- |
- GrGpuResource* res = fContentHash.find(resource->getContentKey()); |
+ SkASSERT(resource->cacheAccess().getContentKey().isValid()); |
+ |
+ GrGpuResource* res = fContentHash.find(resource->cacheAccess().getContentKey()); |
if (NULL != res) { |
return false; |
} |
@@ -281,7 +281,7 @@ |
// Also purge if the resource has neither a valid scratch key nor a content key. |
bool noKey = !resource->cacheAccess().getScratchKey().isValid() && |
- !resource->getContentKey().isValid(); |
+ !resource->cacheAccess().getContentKey().isValid(); |
if (overBudget || noKey) { |
release = true; |
} |
@@ -435,18 +435,18 @@ |
} |
if (resource->cacheAccess().isScratch()) { |
- SkASSERT(!resource->getContentKey().isValid()); |
+ SkASSERT(!resource->cacheAccess().getContentKey().isValid()); |
++scratch; |
SkASSERT(fScratchMap.countForKey(resource->cacheAccess().getScratchKey())); |
SkASSERT(!resource->cacheAccess().isWrapped()); |
} else if (resource->cacheAccess().getScratchKey().isValid()) { |
SkASSERT(!resource->cacheAccess().isBudgeted() || |
- resource->getContentKey().isValid()); |
+ resource->cacheAccess().getContentKey().isValid()); |
++couldBeScratch; |
SkASSERT(fScratchMap.countForKey(resource->cacheAccess().getScratchKey())); |
SkASSERT(!resource->cacheAccess().isWrapped()); |
} |
- const GrContentKey& contentKey = resource->getContentKey(); |
+ const GrContentKey& contentKey = resource->cacheAccess().getContentKey(); |
if (contentKey.isValid()) { |
++content; |
SkASSERT(fContentHash.find(contentKey) == resource); |