Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | List of all members
GrMtlSemaphore Class Reference

#include <GrMtlSemaphore.h>

Inheritance diagram for GrMtlSemaphore:
GrSemaphore

Public Member Functions

 ~GrMtlSemaphore () override
 
sk_sp< GrMtlEventevent ()
 
uint64_t value () const
 
GrBackendSemaphore backendSemaphore () const override
 
- Public Member Functions inherited from GrSemaphore
virtual ~GrSemaphore ()
 
virtual GrBackendSemaphore backendSemaphore () const =0
 

Static Public Member Functions

static std::unique_ptr< GrMtlSemaphoreMake (GrMtlGpu *gpu)
 
static std::unique_ptr< GrMtlSemaphoreMakeWrapped (GrMTLHandle mtlEvent, uint64_t value)
 

Detailed Description

Definition at line 57 of file GrMtlSemaphore.h.

Constructor & Destructor Documentation

◆ ~GrMtlSemaphore()

GrMtlSemaphore::~GrMtlSemaphore ( )
inlineoverride

Definition at line 75 of file GrMtlSemaphore.h.

75{}

Member Function Documentation

◆ backendSemaphore()

GrBackendSemaphore GrMtlSemaphore::backendSemaphore ( ) const
overridevirtual

Implements GrSemaphore.

Definition at line 39 of file GrMtlSemaphore.mm.

39 {
41 // The GrMtlSemaphore and the GrBackendSemaphore will have strong ownership at this point.
42 // Whoever uses the GrBackendSemaphore will subsquently steal this ref (see MakeWrapped, above).
43 if (@available(macOS 10.14, iOS 12.0, tvOS 12.0, *)) {
44 GrMTLHandle handle = (__bridge_retained GrMTLHandle)(fEvent->mtlEvent());
46 }
47 return backendSemaphore;
48}
const void * GrMTLHandle
Definition: GrMtlTypes.h:20
id< MTLEvent > mtlEvent() const SK_API_AVAILABLE(macos(10.14)
GrBackendSemaphore backendSemaphore() const override
SK_API GrBackendSemaphore MakeMtl(GrMTLHandle event, uint64_t value)

◆ event()

sk_sp< GrMtlEvent > GrMtlSemaphore::event ( )
inline

Definition at line 77 of file GrMtlSemaphore.h.

77{ return fEvent; }

◆ Make()

static std::unique_ptr< GrMtlSemaphore > GrMtlSemaphore::Make ( GrMtlGpu gpu)
inlinestatic

Definition at line 59 of file GrMtlSemaphore.h.

59 {
61 if (!event) {
62 return nullptr;
63 }
64 return std::unique_ptr<GrMtlSemaphore>(new GrMtlSemaphore(std::move(event), 1));
65 }
static sk_sp< GrMtlEvent > Make(GrMtlGpu *gpu)
sk_sp< GrMtlEvent > event()

◆ MakeWrapped()

static std::unique_ptr< GrMtlSemaphore > GrMtlSemaphore::MakeWrapped ( GrMTLHandle  mtlEvent,
uint64_t  value 
)
inlinestatic

Definition at line 67 of file GrMtlSemaphore.h.

67 {
69 if (!event) {
70 return nullptr;
71 }
72 return std::unique_ptr<GrMtlSemaphore>(new GrMtlSemaphore(std::move(event), value));
73 }
static sk_sp< GrMtlEvent > MakeWrapped(GrMTLHandle event)
uint64_t value() const

◆ value()

uint64_t GrMtlSemaphore::value ( ) const
inline

Definition at line 78 of file GrMtlSemaphore.h.

78{ return fValue; }

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