aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2014-11-20 10:07:54 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-20 10:07:54 -0800
commitd6ab2a8e45f6c473c076a828aa401919d7519d05 (patch)
tree036853e771364b74b4f3478e779ee2eaf05abd56 /include/core
parentb03c4a35bd319d883925a39871b4972ff1b2c0cc (diff)
Add SkNVRefCnt::deref().
TBR=reed@google.com BUG=skia: Review URL: https://codereview.chromium.org/744853002
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkRefCnt.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index 9b246f4f54..930bf8668b 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -262,6 +262,7 @@ public:
bool unique() const { return 1 == sk_acquire_load(&fRefCnt); }
void ref() const { sk_atomic_inc(&fRefCnt); }
void unref() const { if (1 == sk_atomic_dec(&fRefCnt)) { SkDELETE((const Derived*)this); } }
+ void deref() const { this->unref(); } // Chrome prefers to call deref().
private:
mutable int32_t fRefCnt;
};