aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkRefCnt.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-03-17 05:31:07 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-17 05:31:07 -0700
commitbbd60689bb080fd147565dbc171f19a6ef177997 (patch)
tree27851e81dfb54bea73675090e90373783c31022d /include/core/SkRefCnt.h
parentcc864c336d19e3223f603af5f711a00ad721f647 (diff)
Add back SkAutoTUnref::detach() for Android temporarily.
Diffstat (limited to 'include/core/SkRefCnt.h')
-rw-r--r--include/core/SkRefCnt.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index 98e521f6ea..ce8662b6e3 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -196,6 +196,11 @@ public:
operator T*() const { return this->get(); }
+#if defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)
+ // Need to update graphics/Shader.cpp.
+ T* detach() { return this->release(); }
+#endif
+
// Android's std::unique_ptr's operator bool() is sometimes not explicit...
// so override it with our own explcitly explicit version.
explicit operator bool() const { return this->get() != nullptr; }