Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Unified Diff: src/gpu/GrGpuResource.cpp

Issue 940463006: Rename GrContentKey to GrUniqueKey (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrGpuResourceCacheAccess.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpuResource.cpp
diff --git a/src/gpu/GrGpuResource.cpp b/src/gpu/GrGpuResource.cpp
index d86ec7cafd1e6634ae676236dcc7c5f2a0236018..0c2c9a184949a236f6ac462d6c93324ac50a6104 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);
}
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrGpuResourceCacheAccess.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698