aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTexture.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-07-21 14:24:01 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-07-21 14:24:01 -0700
commitdcabb05113a732636691abc16d643a091336aea5 (patch)
treeeec7d857f242aa1a754cb12e0b03f1675edbe330 /src/gpu/GrTexture.cpp
parentb0a46413e41020006b9e5f0233474821cbb53ab3 (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.cpp3
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();
}