aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkRefCnt.h
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-02-19 14:10:57 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-19 19:40:14 +0000
commit19d7bd65045e88724ad59a8d7066a9092754c7e4 (patch)
treec46b06298abfd41ea470ff9fd75681ec4742b3c7 /include/core/SkRefCnt.h
parent65fce9edc44a18e7dc56035cd1bbbd3acc7a7b30 (diff)
hide virtual and rename to onMakeComposed
Bug: skia: Change-Id: Ic18ee2af3273f81ebec9c9031162e808186c0acd Reviewed-on: https://skia-review.googlesource.com/108300 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include/core/SkRefCnt.h')
-rw-r--r--include/core/SkRefCnt.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index 01580abe1a..5d070a2cc1 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -445,4 +445,8 @@ template <typename T> sk_sp<T> sk_ref_sp(T* obj) {
return sk_sp<T>(SkSafeRef(obj));
}
+template <typename T> sk_sp<T> sk_ref_sp(const T* obj) {
+ return sk_sp<T>(const_cast<T*>(SkSafeRef(obj)));
+}
+
#endif