diff options
author | mtklein <mtklein@chromium.org> | 2016-03-17 05:31:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-17 05:31:07 -0700 |
commit | bbd60689bb080fd147565dbc171f19a6ef177997 (patch) | |
tree | 27851e81dfb54bea73675090e90373783c31022d /include/core/SkRefCnt.h | |
parent | cc864c336d19e3223f603af5f711a00ad721f647 (diff) |
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
Diffstat (limited to 'include/core/SkRefCnt.h')
-rw-r--r-- | include/core/SkRefCnt.h | 5 |
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; } |