createRiveSurface

Create a Rive rendering surface for Rive to draw into.

⚠️ The returned surface must be closed when no longer needed.

Uses the concrete render context to create an appropriate surface for the backend.

Return

A RiveSurface that can be used for rendering.

Parameters

surface

Owned Android surface source. This command queue takes ownership and closes it if surface creation fails or when the created RiveSurface is destroyed on the command server thread.

Throws

If the underlying Android or backend surface cannot be created.

If this command queue has been released.