From 1ab3e5a123109704789c2768e11a4f9af515821d Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Wed, 14 Oct 2026 13:13:52 +0300 Subject: Redefine public and rendering APIs with explicit contracts --- include/yasl/metal.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/yasl/metal.h') diff --git a/include/yasl/metal.h b/include/yasl/metal.h index 695f80c..8197d80 100644 --- a/include/yasl/metal.h +++ b/include/yasl/metal.h @@ -12,8 +12,9 @@ extern "C" { #endif /** Borrowed until surface destruction. YASL owns view/layer and drawableSize. * No device, drawable acquisition, command submission, or implicit present. - * Returns NULL on unsupported backend, CPU/GL surface, or incompatible presenter. */ -YASL_API CAMetalLayer *yasl_metal_layer(yasl_surface *surface); + * Returns -ENOTSUP on unsupported backends, -EBUSY for a different presenter. + * Clears out on failure. Successful access reserves the surface for Metal. */ +YASL_API int yasl_metal_get_layer(yasl_surface *surface, CAMetalLayer **out); #ifdef __cplusplus } #endif -- cgit v1.2.3