Index: include/core/SkRefCnt.h |
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h |
index 98e521f6ea0bede93f7bd6d10c7031b76f3345fc..ce8662b6e38b76ab6bd147b378e24f3739ca7b69 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; } |