summaryrefslogtreecommitdiff
path: root/include/yasl/metal.h
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-14 13:13:52 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-14 13:13:52 +0300
commit1ab3e5a123109704789c2768e11a4f9af515821d (patch)
tree31ee03e58093a58100c6eb58681d5d29648a5ddd /include/yasl/metal.h
parentd86fa6215d40caa7852dbbd6a8cf4aa8e89dd879 (diff)
Redefine public and rendering APIs with explicit contracts
Diffstat (limited to 'include/yasl/metal.h')
-rw-r--r--include/yasl/metal.h5
1 files changed, 3 insertions, 2 deletions
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