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

Unified Diff: include/gpu/GrContext.h

Issue 392333008: Make GrCacheable implement its own ref counting. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: int32_t Created 6 years, 5 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
Index: include/gpu/GrContext.h
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index bdea2f94ce4c5e545a0e8d84228e4d950dd22c73..92fa881f7b3d9437d56aa038bb542d25e3373fdb 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -1119,7 +1119,7 @@ public:
// The cache also has a ref which we are lending to the caller of detach(). When the caller
// lets go of the ref and the ref count goes to 0 internal_dispose will see this flag is
// set and re-ref the texture, thereby restoring the cache's ref.
- SkASSERT(texture->getRefCnt() > 1);
+ SkASSERT(!texture->unique());
texture->impl()->setFlag((GrTextureFlags) GrTextureImpl::kReturnToCache_FlagBit);
texture->unref();
SkASSERT(NULL != texture->getCacheEntry());

Powered by Google App Engine
This is Rietveld 408576698