diff options
author | 2014-11-20 16:56:22 -0500 | |
---|---|---|
committer | 2014-11-20 16:56:22 -0500 | |
commit | 844aa334a43a95cd83a27d565db1d3370d8dc10c (patch) | |
tree | 54ce53d0bd9585ebdb621d241037d1997e25c42a /include/core | |
parent | 2d97bc139a7de5813468bd3dbfd0037351ae5606 (diff) |
Add SkNVRefCnt::getRefCnt()
Used in Blink unit tests.
TBR=mtklein@google.com,humper@google.com
Review URL: https://codereview.chromium.org/746693002
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkRefCnt.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h index 930bf8668b..1e31d918cc 100644 --- a/include/core/SkRefCnt.h +++ b/include/core/SkRefCnt.h @@ -263,6 +263,8 @@ public: 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(). + int32_t getRefCnt() const { return fRefCnt; } // Used by Chrome unit tests. + private: mutable int32_t fRefCnt; }; |