Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | List of all members
skgpu::graphite::Context::ContextID Class Reference

#include <Context.h>

Public Member Functions

 ContextID ()
 
bool operator== (const ContextID &that) const
 
bool operator!= (const ContextID &that) const
 
void makeInvalid ()
 
bool isValid () const
 

Static Public Member Functions

static Context::ContextID Next ()
 

Detailed Description

Definition at line 186 of file Context.h.

Constructor & Destructor Documentation

◆ ContextID()

skgpu::graphite::Context::ContextID::ContextID ( )
inline

Definition at line 190 of file Context.h.

190: fID(SK_InvalidUniqueID) {}
static constexpr uint32_t SK_InvalidUniqueID
Definition: SkTypes.h:196

Member Function Documentation

◆ isValid()

bool skgpu::graphite::Context::ContextID::isValid ( ) const
inline

Definition at line 196 of file Context.h.

196{ return fID != SK_InvalidUniqueID; }

◆ makeInvalid()

void skgpu::graphite::Context::ContextID::makeInvalid ( )
inline

Definition at line 195 of file Context.h.

195{ fID = SK_InvalidUniqueID; }

◆ Next()

Context::ContextID skgpu::graphite::Context::ContextID::Next ( )
static

Definition at line 70 of file Context.cpp.

70 {
71 static std::atomic<uint32_t> nextID{1};
72 uint32_t id;
73 do {
74 id = nextID.fetch_add(1, std::memory_order_relaxed);
75 } while (id == SK_InvalidUniqueID);
76 return ContextID(id);
77}
const uintptr_t id

◆ operator!=()

bool skgpu::graphite::Context::ContextID::operator!= ( const ContextID that) const
inline

Definition at line 193 of file Context.h.

193{ return !(*this == that); }

◆ operator==()

bool skgpu::graphite::Context::ContextID::operator== ( const ContextID that) const
inline

Definition at line 192 of file Context.h.

192{ return fID == that.fID; }

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