8#ifndef GrVkSemaphore_DEFINED
9#define GrVkSemaphore_DEFINED
24 static std::unique_ptr<GrVkSemaphore>
Make(
GrVkGpu* gpu,
bool isOwned);
38 bool prohibitSignal,
bool prohibitWait,
bool isOwned)
41 , fHasBeenSubmittedToQueueForSignal(prohibitSignal)
42 , fHasBeenSubmittedToQueueForWait(prohibitWait)
43 , fIsOwned(isOwned) {}
47 VkSemaphore
semaphore()
const {
return fSemaphore; }
50 return !fHasBeenSubmittedToQueueForSignal;
53 return !fHasBeenSubmittedToQueueForWait;
57 fHasBeenSubmittedToQueueForSignal =
true;
60 fHasBeenSubmittedToQueueForWait =
true;
67#ifdef SK_TRACE_MANAGED_RESOURCES
68 void dumpInfo()
const override {
69 SkDebugf(
"GrVkSemaphore: %" PRIdPTR
" (%d refs)\n", (intptr_t)fSemaphore,
74 void freeGPUData()
const override;
76 VkSemaphore fSemaphore;
77 bool fHasBeenSubmittedToQueueForSignal;
78 bool fHasBeenSubmittedToQueueForWait;
90 void setIsOwned()
override {
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
GrVkManagedResource(const GrVkGpu *gpu)
Resource(const GrVkGpu *gpu, VkSemaphore semaphore, bool prohibitSignal, bool prohibitWait, bool isOwned)
bool shouldSignal() const
VkSemaphore semaphore() const
~GrVkSemaphore() override
GrBackendSemaphore backendSemaphore() const override
static std::unique_ptr< GrVkSemaphore > Make(GrVkGpu *gpu, bool isOwned)
static std::unique_ptr< GrVkSemaphore > MakeWrapped(GrVkGpu *, VkSemaphore, GrSemaphoreWrapType, GrWrapOwnership)