Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GrTextureResource Class Reference

#include <GrManagedResource.h>

Inheritance diagram for GrTextureResource:
GrManagedResource SkNoncopyable

Public Member Functions

 GrTextureResource ()
 
 ~GrTextureResource () override
 
void setRelease (sk_sp< GrSurface::RefCntedReleaseProc > releaseHelper)
 
- Public Member Functions inherited from GrManagedResource
 GrManagedResource ()
 
virtual ~GrManagedResource ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Protected Member Functions

void invokeReleaseProc () const
 

Protected Attributes

sk_sp< GrSurface::RefCntedReleaseProcfReleaseHelper
 

Detailed Description

GrTextureResource is the base class for managed texture resources, and implements the basic releaseProc functionality for them.

Definition at line 217 of file GrManagedResource.h.

Constructor & Destructor Documentation

◆ GrTextureResource()

GrTextureResource::GrTextureResource ( )
inline

Definition at line 219 of file GrManagedResource.h.

219{}

◆ ~GrTextureResource()

GrTextureResource::~GrTextureResource ( )
inlineoverride

Definition at line 221 of file GrManagedResource.h.

221 {
223 }
#define SkASSERT(cond)
Definition: SkAssert.h:116
sk_sp< GrSurface::RefCntedReleaseProc > fReleaseHelper

Member Function Documentation

◆ invokeReleaseProc()

void GrTextureResource::invokeReleaseProc ( ) const
inlineprotected

Definition at line 232 of file GrManagedResource.h.

232 {
233 if (fReleaseHelper) {
234 // Depending on the ref count of fReleaseHelper this may or may not actually trigger
235 // the ReleaseProc to be called.
237 }
238 }
void reset(T *ptr=nullptr)
Definition: SkRefCnt.h:310

◆ setRelease()

void GrTextureResource::setRelease ( sk_sp< GrSurface::RefCntedReleaseProc releaseHelper)
inline

Definition at line 225 of file GrManagedResource.h.

225 {
226 fReleaseHelper = std::move(releaseHelper);
227 }

Member Data Documentation

◆ fReleaseHelper

sk_sp<GrSurface::RefCntedReleaseProc> GrTextureResource::fReleaseHelper
mutableprotected

Definition at line 230 of file GrManagedResource.h.


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