Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
GrVkSemaphore::Resource Class Reference

#include <GrVkSemaphore.h>

Inheritance diagram for GrVkSemaphore::Resource:
GrVkManagedResource GrManagedResource SkNoncopyable

Public Member Functions

 Resource (const GrVkGpu *gpu, VkSemaphore semaphore, bool prohibitSignal, bool prohibitWait, bool isOwned)
 
 ~Resource () override
 
VkSemaphore semaphore () const
 
bool shouldSignal () const
 
bool shouldWait () const
 
void markAsSignaled ()
 
void markAsWaited ()
 
void setIsOwned ()
 
- Public Member Functions inherited from GrVkManagedResource
 GrVkManagedResource (const GrVkGpu *gpu)
 
- Public Member Functions inherited from GrManagedResource
 GrManagedResource ()
 
virtual ~GrManagedResource ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Private Member Functions

void freeGPUData () const override
 

Additional Inherited Members

- Protected Attributes inherited from GrVkManagedResource
const GrVkGpufGpu
 

Detailed Description

Definition at line 35 of file GrVkSemaphore.h.

Constructor & Destructor Documentation

◆ Resource()

GrVkSemaphore::Resource::Resource ( const GrVkGpu gpu,
VkSemaphore  semaphore,
bool  prohibitSignal,
bool  prohibitWait,
bool  isOwned 
)
inline

Definition at line 37 of file GrVkSemaphore.h.

39 : INHERITED(gpu)
40 , fSemaphore(semaphore)
41 , fHasBeenSubmittedToQueueForSignal(prohibitSignal)
42 , fHasBeenSubmittedToQueueForWait(prohibitWait)
43 , fIsOwned(isOwned) {}
VkSemaphore semaphore() const

◆ ~Resource()

GrVkSemaphore::Resource::~Resource ( )
inlineoverride

Definition at line 45 of file GrVkSemaphore.h.

45{}

Member Function Documentation

◆ freeGPUData()

void GrVkSemaphore::Resource::freeGPUData ( ) const
overrideprivatevirtual

Must be implemented by any subclasses. Deletes any GPU data associated with this resource

Implements GrManagedResource.

Definition at line 63 of file GrVkSemaphore.cpp.

63 {
64 if (fIsOwned) {
66 DestroySemaphore(fGpu->device(), fSemaphore, nullptr));
67 }
68}
#define GR_VK_CALL(IFACE, X)
Definition GrVkUtil.h:24
const skgpu::VulkanInterface * vkInterface() const
Definition GrVkGpu.h:60
VkDevice device() const
Definition GrVkGpu.h:71

◆ markAsSignaled()

void GrVkSemaphore::Resource::markAsSignaled ( )
inline

Definition at line 56 of file GrVkSemaphore.h.

56 {
57 fHasBeenSubmittedToQueueForSignal = true;
58 }

◆ markAsWaited()

void GrVkSemaphore::Resource::markAsWaited ( )
inline

Definition at line 59 of file GrVkSemaphore.h.

59 {
60 fHasBeenSubmittedToQueueForWait = true;
61 }

◆ semaphore()

VkSemaphore GrVkSemaphore::Resource::semaphore ( ) const
inline

Definition at line 47 of file GrVkSemaphore.h.

47{ return fSemaphore; }

◆ setIsOwned()

void GrVkSemaphore::Resource::setIsOwned ( )
inline

Definition at line 63 of file GrVkSemaphore.h.

63 {
64 fIsOwned = true;
65 }

◆ shouldSignal()

bool GrVkSemaphore::Resource::shouldSignal ( ) const
inline

Definition at line 49 of file GrVkSemaphore.h.

49 {
50 return !fHasBeenSubmittedToQueueForSignal;
51 }

◆ shouldWait()

bool GrVkSemaphore::Resource::shouldWait ( ) const
inline

Definition at line 52 of file GrVkSemaphore.h.

52 {
53 return !fHasBeenSubmittedToQueueForWait;
54 }

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