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

Unified Diff: src/gpu/GrGpuResourceCacheAccess.h

Issue 864343005: Revert of make getContentKey() available in GrGpuResource public interface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | « include/gpu/GrGpuResource.h ('k') | src/gpu/GrResourceCache2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpuResourceCacheAccess.h
diff --git a/src/gpu/GrGpuResourceCacheAccess.h b/src/gpu/GrGpuResourceCacheAccess.h
index 867252d7834a2d8331a163c6bd9ff4f2c573a84c..aa2337d7f2528645d0e757652ad7bc953a26c14d 100644
--- a/src/gpu/GrGpuResourceCacheAccess.h
+++ b/src/gpu/GrGpuResourceCacheAccess.h
@@ -33,7 +33,7 @@
* key, and does not have a content key.
*/
bool isScratch() const {
- return !fResource->getContentKey().isValid() && fResource->fScratchKey.isValid() &&
+ return !this->getContentKey().isValid() && fResource->fScratchKey.isValid() &&
this->isBudgeted();
}
@@ -51,6 +51,11 @@
void removeScratchKey() const { fResource->removeScratchKey(); }
/**
+ * If the resource is currently cached by a content key, the key is returned, otherwise NULL.
+ */
+ const GrContentKey& getContentKey() const { return fResource->fContentKey; }
+
+ /**
* Is the resource object wrapping an externally allocated GPU resource?
*/
bool isWrapped() const { return GrGpuResource::kWrapped_LifeCycle == fResource->fLifeCycle; }
@@ -60,7 +65,7 @@
*/
bool isBudgeted() const {
bool ret = GrGpuResource::kCached_LifeCycle == fResource->fLifeCycle;
- SkASSERT(ret || !fResource->getContentKey().isValid());
+ SkASSERT(ret || !this->getContentKey().isValid());
return ret;
}
« no previous file with comments | « include/gpu/GrGpuResource.h ('k') | src/gpu/GrResourceCache2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698