Method
MaplibreNativeFfiRenderSessionrelease_target_async
Declaration [src]
void
maplibre_native_ffi_render_session_release_target_async (
MaplibreNativeFfiRenderSession* self,
GAsyncReadyCallback callback,
gpointer user_data
)
Description [src]
Lets go of the session’s surface or textures, and keeps the rest of the session.
Use it when the platform takes a surface away, such as when your app goes to
the background. Release every acquired frame first. Frame demands that are
still pending, and later ones until you give the session a new target, finish with MAPLIBRE_NATIVE_FFI_RENDER_RESULT_TARGET_NOT_READY. Once the release
completes, you can destroy the old target.
See mln_render_session_release_target in the
C API reference.
It fails with these errors:
MAPLIBRE_NATIVE_FFI_ERROR_UNSUPPORTEDwhen the session renders offscreen or into Android hardware buffers, dmabufs, DXGI shared textures, or IOSurfaces that it allocates.MAPLIBRE_NATIVE_FFI_ERROR_UNSUPPORTEDwhen the target is a WebGL canvas.MAPLIBRE_NATIVE_FFI_ERROR_TARGET_LOSTwhen the session loses its target before the release runs.
This method completes asynchronously. Use maplibre_native_ffi_render_session_release_target_finish() inside the GAsyncReadyCallback to obtain the result of the operation.
Parameters
callback-
Type:
GAsyncReadyCallbackThe callback to call when the call finishes.
The argument can be NULL. user_data-
Type:
gpointerThe data to pass to
callback.The argument can be NULL.The data is owned by the caller of the method.