lc_render_scene function
Composes a whole scene in one call: creates a width x height canvas,
paints layers onto it in array order, and encodes the result as
format (LcOutputFormat) into *out_data/*out_len. Returns 0 on
success. On success, the caller must release the buffer with
lc_buffer_free.
The caller (the Dart side) is responsible for resolving stacking order
(Layer.zIndex) into layers' array order and dropping invisible layers
before calling this - see scene_desc.h. layers may be NULL only if
layer_count is 0.
Implementation
@ffi.Native<
ffi.Int32 Function(
ffi.Int32,
ffi.Int32,
ffi.Pointer<LcLayerDesc>,
ffi.Int32,
ffi.Int32,
ffi.Pointer<ffi.Pointer<ffi.Uint8>>,
ffi.Pointer<ffi.Size>,
)
>()
external int lc_render_scene(
int width,
int height,
ffi.Pointer<LcLayerDesc> layers,
int layer_count,
int format,
ffi.Pointer<ffi.Pointer<ffi.Uint8>> out_data,
ffi.Pointer<ffi.Size> out_len,
);