Add back SkAutoTDelete::detach() for Android temporarily.
authormtklein <mtklein@chromium.org>
Thu, 17 Mar 2016 00:33:54 +0000 (17:33 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 17 Mar 2016 00:33:54 +0000 (17:33 -0700)
TBR=

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1811483004

Review URL: https://codereview.chromium.org/1811483004

include/private/SkTemplates.h

index 526c307558c6a98db262d54ef37bc5548af69f14..d83ffc8e27d4f7c3f30ae07dd3ac0a07b09d47b3 100644 (file)
@@ -98,6 +98,11 @@ public:
     operator T*() const { return this->get(); }
     void free() { this->reset(nullptr); }
 
+#if defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)
+    // Need to update graphics/BitmapRegionDecoder.cpp.
+    T* detach() { return this->release(); }
+#endif
+
     // See SkAutoTUnref for why we do this.
     explicit operator bool() const { return this->get() != nullptr; }
 };