1 /* 2 * Copyright 2024 Google LLC 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 * 7 */ 8 #ifndef GrMtlBackendSemaphore_DEFINED 9 #define GrMtlBackendSemaphore_DEFINED 10 11 #include "include/gpu/ganesh/GrBackendSemaphore.h" 12 #include "include/gpu/ganesh/mtl/GrMtlTypes.h" 13 #include "include/private/base/SkAPI.h" 14 15 namespace GrBackendSemaphores { 16 // It is the creator's responsibility to ref the MTLEvent passed in here, via __bridge_retained. 17 // The other end will wrap this BackendSemaphore and take the ref, via __bridge_transfer. 18 SK_API GrBackendSemaphore MakeMtl(GrMTLHandle event, uint64_t value); 19 SK_API GrMTLHandle GetMtlHandle(const GrBackendSemaphore&); 20 SK_API uint64_t GetMtlValue(const GrBackendSemaphore&); 21 } // namespace GrBackendSemaphores 22 23 #endif 24