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

Unified Diff: src/gpu/GrGpuResource.cpp

Issue 902873002: Reimplement gpu message bus for invalidated bitmap gen IDs (Closed) Base URL: https://skia.googlesource.com/skia.git@one_tex
Patch Set: fix speeling error 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/core/SkMessageBus.h ('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 6d250e4820cec9eb244190e11af32cc25ac74d61..7fb5559362ab1190a69b5018217b3d4271679635 100644
--- a/src/gpu/GrGpuResource.cpp
+++ b/src/gpu/GrGpuResource.cpp
@@ -82,9 +82,16 @@ void GrGpuResource::didChangeGpuMemorySize() const {
get_resource_cache2(fGpu)->resourceAccess().didChangeGpuMemorySize(this, oldSize);
}
+void GrGpuResource::removeContentKey() {
+ SkASSERT(fContentKey.isValid());
+ get_resource_cache2(fGpu)->resourceAccess().willRemoveContentKey(this);
+ fContentKey.reset();
+}
+
bool GrGpuResource::setContentKey(const GrContentKey& 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.
if (!this->cacheAccess().isBudgeted()) {
« no previous file with comments | « src/core/SkMessageBus.h ('k') | src/gpu/GrGpuResourceCacheAccess.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698