Index: src/gpu/GrGpuResource.cpp |
diff --git a/src/gpu/GrGpuResource.cpp b/src/gpu/GrGpuResource.cpp |
index 8dbbd83ef58ad5a561d74bf0b52594262b0f5464..cc24335184c2b98662e5f9133c4459d179ac3a76 100644 |
--- a/src/gpu/GrGpuResource.cpp |
+++ b/src/gpu/GrGpuResource.cpp |
@@ -128,6 +128,13 @@ void GrGpuResource::setScratchKey(const GrResourceKey& scratchKey) { |
fScratchKey = scratchKey; |
} |
+void GrGpuResource::removeScratchKey() { |
+ if (!this->wasDestroyed() && !fScratchKey.isNullScratch()) { |
+ get_resource_cache2(fGpu)->resourceAccess().willRemoveScratchKey(this); |
+ fScratchKey = GrResourceKey::NullScratchKey(); |
+ } |
+} |
+ |
uint32_t GrGpuResource::CreateUniqueID() { |
static int32_t gUniqueID = SK_InvalidUniqueID; |
uint32_t id; |