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,
76 VkSemaphore fSemaphore;
77 bool fHasBeenSubmittedToQueueForSignal;
78 bool fHasBeenSubmittedToQueueForWait;
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
Resource(const GrVkGpu *gpu, VkSemaphore semaphore, bool prohibitSignal, bool prohibitWait, bool isOwned)
bool shouldSignal() const
void freeGPUData() const override
VkSemaphore semaphore() const
~GrVkSemaphore() override
GrBackendSemaphore backendSemaphore() const override
void setIsOwned() override
static std::unique_ptr< GrVkSemaphore > Make(GrVkGpu *gpu, bool isOwned)
static std::unique_ptr< GrVkSemaphore > MakeWrapped(GrVkGpu *, VkSemaphore, GrSemaphoreWrapType, GrWrapOwnership)