aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpuResource.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-02-19 07:24:21 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-19 07:24:21 -0800
commit8718aafec239c93485e45bbe8fed19d9a8def079 (patch)
tree209402fb1f20c023f822b4af7dd4212e44956821 /src/gpu/GrGpuResource.cpp
parent2e4414e60b1f98e1736aa1925cbe181ed37d11e8 (diff)
Rename GrContentKey to GrUniqueKey
Diffstat (limited to 'src/gpu/GrGpuResource.cpp')
-rw-r--r--src/gpu/GrGpuResource.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gpu/GrGpuResource.cpp b/src/gpu/GrGpuResource.cpp
index d86ec7cafd..0c2c9a1849 100644
--- a/src/gpu/GrGpuResource.cpp
+++ b/src/gpu/GrGpuResource.cpp
@@ -84,30 +84,30 @@ void GrGpuResource::didChangeGpuMemorySize() const {
get_resource_cache(fGpu)->resourceAccess().didChangeGpuMemorySize(this, oldSize);
}
-void GrGpuResource::removeContentKey() {
- SkASSERT(fContentKey.isValid());
- get_resource_cache(fGpu)->resourceAccess().willRemoveContentKey(this);
- fContentKey.reset();
+void GrGpuResource::removeUniqueKey() {
+ SkASSERT(fUniqueKey.isValid());
+ get_resource_cache(fGpu)->resourceAccess().willRemoveUniqueKey(this);
+ fUniqueKey.reset();
}
-bool GrGpuResource::setContentKey(const GrContentKey& key) {
+bool GrGpuResource::setUniqueKey(const GrUniqueKey& key) {
// Currently this can only be called once and can't be called when the resource is scratch.
SkASSERT(this->internalHasRef());
SkASSERT(key.isValid());
- // Wrapped and uncached resources can never have a content key.
+ // Wrapped and uncached resources can never have a unique key.
if (!this->resourcePriv().isBudgeted()) {
return false;
}
- if (fContentKey.isValid() || this->wasDestroyed()) {
+ if (fUniqueKey.isValid() || this->wasDestroyed()) {
return false;
}
- fContentKey = key;
+ fUniqueKey = key;
- if (!get_resource_cache(fGpu)->resourceAccess().didSetContentKey(this)) {
- fContentKey.reset();
+ if (!get_resource_cache(fGpu)->resourceAccess().didSetUniqueKey(this)) {
+ fUniqueKey.reset();
return false;
}
return true;
@@ -148,7 +148,7 @@ void GrGpuResource::makeBudgeted() {
}
void GrGpuResource::makeUnbudgeted() {
- if (GrGpuResource::kCached_LifeCycle == fLifeCycle && !fContentKey.isValid()) {
+ if (GrGpuResource::kCached_LifeCycle == fLifeCycle && !fUniqueKey.isValid()) {
fLifeCycle = kUncached_LifeCycle;
get_resource_cache(fGpu)->resourceAccess().didChangeBudgetStatus(this);
}