Raxol.UI.Rendering.SafePipeline (Raxol v2.0.1)

View Source

Fault-tolerant rendering pipeline with error recovery and performance monitoring.

Ensures the UI remains responsive even when rendering errors occur, with automatic fallback rendering and performance degradation strategies.

Summary

Functions

Schedules an animation with performance monitoring.

Returns a specification to start this module under a supervisor.

Gets rendering performance statistics.

Safely renders a frame with automatic error recovery.

Enables or disables performance mode.

Updates rendering configuration dynamically.

Types

performance_stats()

@type performance_stats() :: %{
  frames_rendered: non_neg_integer(),
  frames_dropped: non_neg_integer(),
  average_render_time: float(),
  errors_recovered: non_neg_integer(),
  performance_warnings: non_neg_integer()
}

t()

@type t() :: %Raxol.UI.Rendering.SafePipeline{
  config: map(),
  error_handler: map(),
  fallback_renderer: fun(),
  performance_monitor: map(),
  pipeline: pid() | nil,
  render_queue: :queue.queue(),
  stats: performance_stats()
}

Functions

animate(pid \\ __MODULE__, animation, opts \\ [])

Schedules an animation with performance monitoring.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_stats(pid \\ __MODULE__)

Gets rendering performance statistics.

render(pid \\ __MODULE__, scene)

Safely renders a frame with automatic error recovery.

set_performance_mode(pid \\ __MODULE__, enabled)

Enables or disables performance mode.

start_link(init_opts \\ [])

update_config(pid \\ __MODULE__, config)

Updates rendering configuration dynamically.