aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpuResourceCacheAccess.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-11-25 05:52:06 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-25 05:52:06 -0800
commit10e23caea3106be125acea10a637789e5a15c728 (patch)
tree80c21f2ab346fc91983b02fcaa4031604803607b /src/gpu/GrGpuResourceCacheAccess.h
parent03bee31e553100ba7814cda8351d10645500f154 (diff)
Use scratch keys for stencil buffers.
Diffstat (limited to 'src/gpu/GrGpuResourceCacheAccess.h')
-rw-r--r--src/gpu/GrGpuResourceCacheAccess.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/GrGpuResourceCacheAccess.h b/src/gpu/GrGpuResourceCacheAccess.h
index c55bb07774..e220e5f263 100644
--- a/src/gpu/GrGpuResourceCacheAccess.h
+++ b/src/gpu/GrGpuResourceCacheAccess.h
@@ -50,6 +50,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.
*/
const GrResourceKey* getContentKey() const {