aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkRefCnt.h
diff options
context:
space:
mode:
authorGravatar benjaminwagner <benjaminwagner@google.com>2016-04-13 17:51:57 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-13 17:51:57 -0700
commitf9634b95eccd58acf5b20d98c5d2ee5af353d3d2 (patch)
treebfa618ae2b5e75a3a4bbe52383ea6a84731d377b /include/core/SkRefCnt.h
parent5092eacc7e9f8041bb05b678f71e4e917ff5529e (diff)
For GOOGLE3, add deref method to SkRefCnt.
This makes it easier to integrate with Blink code using RefPtr/PassRefPtr without pulling in Chrome's SkUserConfig.h. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1890573003 Review URL: https://codereview.chromium.org/1890573003
Diffstat (limited to 'include/core/SkRefCnt.h')
-rw-r--r--include/core/SkRefCnt.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index abcda7e990..46e69759cb 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -134,7 +134,13 @@ private:
// This SkRefCnt should normally derive from SkRefCntBase.
#include SK_REF_CNT_MIXIN_INCLUDE
#else
-class SK_API SkRefCnt : public SkRefCntBase { };
+class SK_API SkRefCnt : public SkRefCntBase {
+ // "#include SK_REF_CNT_MIXIN_INCLUDE" doesn't work with this build system.
+ #if defined(GOOGLE3)
+ public:
+ void deref() const { this->unref(); }
+ #endif
+};
#endif
///////////////////////////////////////////////////////////////////////////////