diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-11-30 21:30:42 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-11-30 21:30:42 +0000 |
commit | 9f0af0a285addbeb55db5dd92c3a3b92c144532f (patch) | |
tree | 43f72593d558f4820f799a30100e5a209c12101a /include/core | |
parent | 000dea7573e5c902c3e04e93ad6a1aaf83c44d88 (diff) |
Create aliases AddRef() and Release() to SkRefCnt for compatibility with scoped_refptr
Review URL: https://codereview.appspot.com/6844116
git-svn-id: http://skia.googlecode.com/svn/trunk@6639 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkRefCnt.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h index 3a0f8be383..21ed0efec3 100644 --- a/include/core/SkRefCnt.h +++ b/include/core/SkRefCnt.h @@ -71,6 +71,16 @@ public: SkASSERT(fRefCnt > 0); } + /** + * Alias for ref(), for compatibility with scoped_refptr. + */ + void AddRef() { this->ref(); } + + /** + * Alias for unref(), for compatibility with scoped_refptr. + */ + void Release() { this->unref(); } + protected: /** * Allow subclasses to call this if they've overridden internal_dispose |