Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Unified Diff: include/core/SkRefCnt.h

Issue 1812843002: Add back SkAutoTUnref::detach() for Android temporarily. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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; }
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698