Index: src/gpu/GrGpuResourceCacheAccess.h |
diff --git a/src/gpu/GrGpuResourceCacheAccess.h b/src/gpu/GrGpuResourceCacheAccess.h |
index c55bb0777494baa3a9508107baf55d79ee86c23d..237d28760e74ec98fae7fb86d46f96fd89f7698b 100644 |
--- a/src/gpu/GrGpuResourceCacheAccess.h |
+++ b/src/gpu/GrGpuResourceCacheAccess.h |
@@ -49,6 +49,12 @@ public: |
*/ |
const GrResourceKey& getScratchKey() const { return fResource->fScratchKey; } |
+ /** |
+ * If the resource has a scratch key, the key will be removed. Since scratch keys are installed |
+ * at resource creation time, this means the resource will never again be used as scratch. |
+ */ |
+ void removeScratchKey() const { fResource->removeScratchKey(); } |
+ |
/** |
* If the resource is currently cached by a content key, the key is returned, otherwise NULL. |
*/ |