diff options
author | bsalomon <bsalomon@google.com> | 2014-07-21 14:24:01 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-07-21 14:24:01 -0700 |
commit | dcabb05113a732636691abc16d643a091336aea5 (patch) | |
tree | eec7d857f242aa1a754cb12e0b03f1675edbe330 /src/gpu/GrTexture.cpp | |
parent | b0a46413e41020006b9e5f0233474821cbb53ab3 (diff) |
Make GrCacheable implement its own ref counting.
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/392333008
Diffstat (limited to 'src/gpu/GrTexture.cpp')
-rw-r--r-- | src/gpu/GrTexture.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gpu/GrTexture.cpp b/src/gpu/GrTexture.cpp index fb5a8d350e..63069a452b 100644 --- a/src/gpu/GrTexture.cpp +++ b/src/gpu/GrTexture.cpp @@ -29,7 +29,7 @@ void GrTexture::internal_dispose() const { if (this->impl()->isSetFlag((GrTextureFlags) GrTextureImpl::kReturnToCache_FlagBit) && NULL != this->INHERITED::getContext()) { GrTexture* nonConstThis = const_cast<GrTexture *>(this); - this->fRefCnt = 1; // restore ref count to initial setting + this->ref(); // restore ref count to initial setting nonConstThis->impl()->resetFlag((GrTextureFlags) GrTextureImpl::kReturnToCache_FlagBit); nonConstThis->INHERITED::getContext()->addExistingTextureToCache(nonConstThis); @@ -39,7 +39,6 @@ void GrTexture::internal_dispose() const { return; } - SkASSERT(0 == this->getDeferredRefCount()); this->INHERITED::internal_dispose(); } |