Index: src/gpu/GrResourceCache2.cpp |
diff --git a/src/gpu/GrResourceCache2.cpp b/src/gpu/GrResourceCache2.cpp |
index d30397337fcd96a0abaa7a3d3f4587857bfdc3cc..39181554d23705bc863e5f0ad4c3d0b1dc88dd77 100644 |
--- a/src/gpu/GrResourceCache2.cpp |
+++ b/src/gpu/GrResourceCache2.cpp |
@@ -218,6 +218,11 @@ GrGpuResource* GrResourceCache2::findAndRefScratchResource(const GrResourceKey& |
return resource; |
} |
+void GrResourceCache2::willRemoveScratchKey(const GrGpuResource* resource) { |
+ SkASSERT(resource->cacheAccess().isScratch()); |
+ fScratchMap.remove(resource->cacheAccess().getScratchKey(), resource); |
+} |
+ |
bool GrResourceCache2::didSetContentKey(GrGpuResource* resource) { |
SkASSERT(!fPurging); |
SkASSERT(resource); |