releaseTarget method
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 RenderResult.targetNotReady. Once the release completes, you
can destroy the old target.
See mln_render_session_release_target in the
C API reference.
Errors:
Status.unsupportedwhen the session renders offscreen or into Android hardware buffers, dmabufs, DXGI shared textures, or IOSurfaces that it allocates.Status.unsupportedwhen the target is a WebGL canvas.Status.targetLostwhen the session loses its target before the release runs.
Implementation
Future<void> releaseTarget() => _run(
(arena, completion) => raw.mln_render_session_release_target(
_handle.raw,
completion,
nativeDiagnostic,
),
);