8#ifndef GrMtlSemaphore_DEFINED
9#define GrMtlSemaphore_DEFINED
17#include <Metal/Metal.h>
29 id<MTLEvent>
mtlEvent() const SK_API_AVAILABLE(macos(10.14),
ios(12.0),
tvos(12.0)) {
33#ifdef SK_TRACE_MANAGED_RESOURCES
36 void dumpInfo()
const override {
37 if (@available(macOS 10.14, iOS 12.0, tvOS 12.0, *)) {
38 SkDebugf(
"GrMtlEvent: %p (%ld refs)\n", fMtlEvent,
39 CFGetRetainCount((CFTypeRef)fMtlEvent));
45 if (@available(macOS 10.14, iOS 12.0, tvOS 12.0, *)) {
54 mutable id<MTLEvent> fMtlEvent SK_API_AVAILABLE(macos(10.14),
ios(12.0),
tvos(12.0));
78 uint64_t
value()
const {
return fValue; }
87 void setIsOwned()
override {}
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
void freeGPUData() const override
id< MTLEvent > mtlEvent() const SK_API_AVAILABLE(macos(10.14)
static sk_sp< GrMtlEvent > Make(GrMtlGpu *gpu)
id< MTLEvent > tvos(12.0))
static sk_sp< GrMtlEvent > MakeWrapped(GrMTLHandle event)
static std::unique_ptr< GrMtlSemaphore > Make(GrMtlGpu *gpu)
sk_sp< GrMtlEvent > event()
~GrMtlSemaphore() override
static std::unique_ptr< GrMtlSemaphore > MakeWrapped(GrMTLHandle mtlEvent, uint64_t value)
GrBackendSemaphore backendSemaphore() const override