Lines Matching refs:gr_sp
17 template <typename T, auto Ref, auto Unref> class gr_sp {
35 constexpr gr_sp() : fPtr(nullptr) {} in gr_sp() function
36 constexpr gr_sp(std::nullptr_t) : fPtr(nullptr) {} in gr_sp() function
42 gr_sp(const gr_sp<T, Ref, Unref>& that) : fPtr(SafeRef(that.get())) {} in gr_sp() function
45 gr_sp(const gr_sp<U, Ref, Unref>& that) : fPtr(SafeRef(that.get())) {} in gr_sp() function
47 gr_sp(const sk_sp<T>& that) : fPtr(SafeRef(that.get())) {} in gr_sp() function
55 gr_sp(gr_sp<T, Ref, Unref>&& that) : fPtr(that.release()) {} in gr_sp() function
61 gr_sp(sk_sp<T>&& that) : fPtr(SafeRef(that.get())) {} in gr_sp() function
67 explicit gr_sp(T* obj) : fPtr(obj) {} in gr_sp() function
72 ~gr_sp() { in ~gr_sp()
77 gr_sp& operator=(std::nullptr_t) {
86 gr_sp& operator=(const gr_sp<T, Ref, Unref>& that) {
98 gr_sp& operator=(const sk_sp<T>& that) {
108 gr_sp& operator=(gr_sp<T, Ref, Unref>&& that) {
118 gr_sp& operator=(sk_sp<T>&& that) {
173 gr_sp<T, &T::addCommandBufferUsage, &T::removeCommandBufferUsage>;
180 template<typename T> using gr_rp = gr_sp<T, &T::ref, &T::recycle>;