Raxol.UI.Rendering.AdaptiveFramerate (Raxol v2.0.1)
View SourceDynamically adjusts rendering frame rate based on system performance and content complexity.
Frame Rate Targets
- High complexity: 30fps (33ms) - Complex layouts, many elements
- Medium complexity: 45fps (22ms) - Moderate layouts
- Low complexity: 60fps (16ms) - Simple layouts, minimal changes
- Static content: 10fps (100ms) - No active animations
Adaptation Triggers
- Render time exceeding target
- CPU usage above threshold
- Large number of damage regions
- Complex tree structures
Summary
Functions
Returns a specification to start this module under a supervisor.
Forces a frame rate adaptation check. Useful for testing or immediate response to system changes.
Gets the current recommended frame interval in milliseconds.
Gets current framerate statistics and adaptation state.
Reports a completed render with timing and complexity metrics. Used to adapt frame rate based on actual performance.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Forces a frame rate adaptation check. Useful for testing or immediate response to system changes.
@spec get_frame_interval(pid() | atom()) :: pos_integer()
Gets the current recommended frame interval in milliseconds.
Gets current framerate statistics and adaptation state.
@spec report_render( render_time_us :: non_neg_integer(), complexity_score :: non_neg_integer(), damage_count :: non_neg_integer(), pid() | atom() ) :: :ok
Reports a completed render with timing and complexity metrics. Used to adapt frame rate based on actual performance.