Flutter Engine
The Flutter Engine
Public Member Functions | Friends | List of all members
GrBackendSemaphore Class Reference

#include <GrBackendSemaphore.h>

Public Member Functions

 GrBackendSemaphore ()
 
 ~GrBackendSemaphore ()
 
 GrBackendSemaphore (const GrBackendSemaphore &)
 
GrBackendSemaphoreoperator= (const GrBackendSemaphore &)
 
bool isInitialized () const
 
GrBackendApi backend () const
 

Friends

class GrBackendSemaphorePriv
 
class GrBackendSemaphoreData
 

Detailed Description

Wrapper class for passing into and receiving data from Ganesh about a backend semaphore object.

Definition at line 26 of file GrBackendSemaphore.h.

Constructor & Destructor Documentation

◆ GrBackendSemaphore() [1/2]

GrBackendSemaphore::GrBackendSemaphore ( )

Definition at line 18 of file GrBackendSemaphore.cpp.

19 : fBackend(GrBackendApi::kUnsupported), fIsInitialized(false) {}

◆ ~GrBackendSemaphore()

GrBackendSemaphore::~GrBackendSemaphore ( )

Definition at line 23 of file GrBackendSemaphore.cpp.

23 {
24#ifdef SK_DIRECT3D
25 if (fIsInitialized && GrBackendApi::kDirect3D == fBackend) {
26 delete fD3DFenceInfo;
27 fD3DFenceInfo = nullptr;
28 fIsInitialized = false;
29 }
30#endif
31}

◆ GrBackendSemaphore() [2/2]

GrBackendSemaphore::GrBackendSemaphore ( const GrBackendSemaphore that)

Definition at line 33 of file GrBackendSemaphore.cpp.

33 {
34 fIsInitialized = false;
35 *this = that;
36}

Member Function Documentation

◆ backend()

GrBackendApi GrBackendSemaphore::backend ( ) const
inline

Definition at line 44 of file GrBackendSemaphore.h.

44{ return fBackend; }

◆ isInitialized()

bool GrBackendSemaphore::isInitialized ( ) const
inline

Definition at line 43 of file GrBackendSemaphore.h.

43{ return fIsInitialized; }

◆ operator=()

GrBackendSemaphore & GrBackendSemaphore::operator= ( const GrBackendSemaphore that)

Definition at line 38 of file GrBackendSemaphore.cpp.

38 {
39 SkASSERT(!fIsInitialized || fBackend == that.fBackend);
40 fBackend = that.fBackend;
41 fSemaphoreData.reset();
42 switch (that.fBackend) {
44 SK_ABORT("Unsupported");
45 break;
48 that.fSemaphoreData->copyTo(fSemaphoreData);
49 break;
50#ifdef SK_DIRECT3D
52 this->assignD3DFenceInfo(*that.fD3DFenceInfo);
53 break;
54#endif
55 default:
56 SK_ABORT("Unknown GrBackend");
57 }
58 fIsInitialized = true;
59 return *this;
60}
#define SK_ABORT(message,...)
Definition: SkAssert.h:70
#define SkASSERT(cond)
Definition: SkAssert.h:116
virtual void copyTo(AnySemaphoreData &) const =0

Friends And Related Function Documentation

◆ GrBackendSemaphoreData

friend class GrBackendSemaphoreData
friend

Definition at line 52 of file GrBackendSemaphore.h.

◆ GrBackendSemaphorePriv

friend class GrBackendSemaphorePriv
friend

Definition at line 51 of file GrBackendSemaphore.h.

Member Data Documentation

◆ fPlaceholder

void* GrBackendSemaphore::fPlaceholder

Definition at line 72 of file GrBackendSemaphore.h.


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