From bbd60689bb080fd147565dbc171f19a6ef177997 Mon Sep 17 00:00:00 2001 From: mtklein Date: Thu, 17 Mar 2016 05:31:07 -0700 Subject: [PATCH] Add back SkAutoTUnref::detach() for Android temporarily. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1812843002 Review URL: https://codereview.chromium.org/1812843002 --- include/core/SkRefCnt.h | 5 +++++ 1 file changed, 5 insertions(+) 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; } -- 2.34.1