aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkRefCnt.h
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2016-11-08 09:03:48 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-08 14:42:19 +0000
commit9075634d60cc8ce979e3007d4ba1d0e57afc6644 (patch)
tree2cdacf11d5a1b778016b6c0e0f025ac2ef63b52d /include/core/SkRefCnt.h
parent294c1c41ed6497da7454ca02bcef267d72fd37e0 (diff)
Remove SkAutoTUnref from public API
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4530 Change-Id: I1ba33edc5ca44332ff4f296e6b9997a133a08a87 Reviewed-on: https://skia-review.googlesource.com/4530 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Mike Reed <reed@google.com>
Diffstat (limited to 'include/core/SkRefCnt.h')
-rw-r--r--include/core/SkRefCnt.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index 9436b52269..53523b419d 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -181,26 +181,6 @@ template<typename T> static inline void SkSafeSetNull(T*& obj) {
///////////////////////////////////////////////////////////////////////////////
-template <typename T> struct SkTUnref {
- void operator()(T* t) { t->unref(); }
-};
-
-/**
- * Utility class that simply unref's its argument in the destructor.
- */
-template <typename T> class SkAutoTUnref : public std::unique_ptr<T, SkTUnref<T>> {
-public:
- explicit SkAutoTUnref(T* obj = nullptr) : std::unique_ptr<T, SkTUnref<T>>(obj) {}
-
- 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
-};
-// Can't use the #define trick to guard a bare SkAutoTUnref(...) because it's templated. :(
-
// This is a variant of SkRefCnt that's Not Virtual, so weighs 4 bytes instead of 8 or 16.
// There's only benefit to using this if the deriving class does not otherwise need a vtable.
template <typename Derived>