diff options
Diffstat (limited to 'include')
-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 |