Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
GrResourceHandle< kind > Class Template Reference

#include <GrResourceHandle.h>

Public Member Functions

 GrResourceHandle (int value)
 
 GrResourceHandle ()
 
bool operator== (const GrResourceHandle &other) const
 
bool isValid () const
 
int toIndex () const
 

Detailed Description

template<typename kind>
class GrResourceHandle< kind >

Definition at line 15 of file GrResourceHandle.h.

Constructor & Destructor Documentation

◆ GrResourceHandle() [1/2]

template<typename kind >
GrResourceHandle< kind >::GrResourceHandle ( int  value)
inline

Definition at line 17 of file GrResourceHandle.h.

17 : fValue(value) {
18 SkASSERT(this->isValid());
19 }
#define SkASSERT(cond)
Definition: SkAssert.h:116
bool isValid() const
uint8_t value

◆ GrResourceHandle() [2/2]

template<typename kind >
GrResourceHandle< kind >::GrResourceHandle ( )
inline

Definition at line 21 of file GrResourceHandle.h.

21: fValue(kInvalid_ResourceHandle) {}

Member Function Documentation

◆ isValid()

template<typename kind >
bool GrResourceHandle< kind >::isValid ( ) const
inline

Definition at line 24 of file GrResourceHandle.h.

24{ return kInvalid_ResourceHandle != fValue; }

◆ operator==()

template<typename kind >
bool GrResourceHandle< kind >::operator== ( const GrResourceHandle< kind > &  other) const
inline

Definition at line 23 of file GrResourceHandle.h.

23{ return other.fValue == fValue; }

◆ toIndex()

template<typename kind >
int GrResourceHandle< kind >::toIndex ( ) const
inline

Definition at line 25 of file GrResourceHandle.h.

25{ SkASSERT(this->isValid()); return fValue; }

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