Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Miaou_driver_matrix.Matrix_render_loopSourceRender loop for the Matrix driver.
Manages frame rendering in a dedicated OCaml 5 Domain for true parallelism. The render domain runs at configurable FPS, computing diffs between front/back buffers and emitting minimal ANSI sequences.
Architecture:
The buffer uses mutex synchronization for thread safety.
Render loop state.
val create :
config:Matrix_config.t ->
buffer:Matrix_buffer.t ->
writer:Matrix_ansi_writer.t ->
write:(string -> unit) ->
tCreate a new render loop (does not start the domain yet).
Request a frame to be rendered (legacy API, now no-op). The render domain automatically renders when buffer is dirty.
Render immediately if buffer is dirty. For use before domain starts or after shutdown. Returns true if a frame was rendered.
Get current achieved FPS - actual renders per second (for diagnostics). Thread-safe.
Get loop FPS - how fast the render loop is checking (the cap). Thread-safe.