aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpuResourceCacheAccess.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-02-19 08:24:16 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-19 08:24:16 -0800
commitf99e961f55bb603d099c8cb57d05a2ae52a4e9ca (patch)
tree4639f4c06a127fb69f810f320a2686cfb3e0ba1d /src/gpu/GrGpuResourceCacheAccess.h
parent4675819b9dbb3ad71ec851776e5de26d342f29fe (diff)
Allow resources' unique keys to be changed.
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 df0ca34bca..4f38fc6002 100644
--- a/src/gpu/GrGpuResourceCacheAccess.h
+++ b/src/gpu/GrGpuResourceCacheAccess.h
@@ -55,6 +55,12 @@ private:
}
}
+ /** Called by the cache to assign a new unique key. */
+ void setUniqueKey(const GrUniqueKey& key) { fResource->fUniqueKey = key; }
+
+ /** Called by the cache to make the unique key invalid. */
+ void removeUniqueKey() { fResource->fUniqueKey.reset(); }
+
uint32_t timestamp() const { return fResource->fTimestamp; }
void setTimestamp(uint32_t ts) { fResource->fTimestamp = ts; }