Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | List of all members
flutter::SkiaGPUObject< T > Class Template Reference

#include <skia_gpu_object.h>

Public Types

using SkiaObjectType = T
 

Public Member Functions

 SkiaGPUObject ()=default
 
 SkiaGPUObject (sk_sp< SkiaObjectType > object, fml::RefPtr< SkiaUnrefQueue > queue)
 
 SkiaGPUObject (SkiaGPUObject &&)=default
 
 ~SkiaGPUObject ()
 
SkiaGPUObjectoperator= (SkiaGPUObject &&)=default
 
sk_sp< SkiaObjectTypeskia_object () const
 
void reset ()
 

Detailed Description

template<class T>
class flutter::SkiaGPUObject< T >

An object whose deallocation needs to be performed on an specific unref queue.

Definition at line 166 of file skia_gpu_object.h.

Member Typedef Documentation

◆ SkiaObjectType

template<class T >
using flutter::SkiaGPUObject< T >::SkiaObjectType = T

Definition at line 168 of file skia_gpu_object.h.

Constructor & Destructor Documentation

◆ SkiaGPUObject() [1/3]

template<class T >
flutter::SkiaGPUObject< T >::SkiaGPUObject ( )
default

◆ SkiaGPUObject() [2/3]

template<class T >
flutter::SkiaGPUObject< T >::SkiaGPUObject ( sk_sp< SkiaObjectType object,
fml::RefPtr< SkiaUnrefQueue queue 
)
inline

Definition at line 171 of file skia_gpu_object.h.

172 : object_(std::move(object)), queue_(std::move(queue)) {
173 FML_DCHECK(object_);
174 }
VkQueue queue
Definition: main.cc:55
#define FML_DCHECK(condition)
Definition: logging.h:103

◆ SkiaGPUObject() [3/3]

template<class T >
flutter::SkiaGPUObject< T >::SkiaGPUObject ( SkiaGPUObject< T > &&  )
default

◆ ~SkiaGPUObject()

template<class T >
flutter::SkiaGPUObject< T >::~SkiaGPUObject ( )
inline

Definition at line 176 of file skia_gpu_object.h.

176{ reset(); }

Member Function Documentation

◆ operator=()

template<class T >
SkiaGPUObject & flutter::SkiaGPUObject< T >::operator= ( SkiaGPUObject< T > &&  )
default

◆ reset()

template<class T >
void flutter::SkiaGPUObject< T >::reset ( )
inline

Definition at line 182 of file skia_gpu_object.h.

182 {
183 if (object_ && queue_) {
184 queue_->Unref(object_.release());
185 }
186 queue_ = nullptr;
187 FML_DCHECK(object_ == nullptr);
188 }
T * release()
Definition: SkRefCnt.h:324

◆ skia_object()

template<class T >
sk_sp< SkiaObjectType > flutter::SkiaGPUObject< T >::skia_object ( ) const
inline

Definition at line 180 of file skia_gpu_object.h.

180{ return object_; }

The documentation for this class was generated from the following file: