Tracks frontend-reported macOS low power mode and thermal pressure.
The BEAM owns render pacing, so this state converts resource-pressure signals from native frontends into a minimum render debounce. Normal operation remains at the caller-requested cadence.
Summary
Functions
Returns the default no-pressure state.
Returns the minimum render debounce in milliseconds for the current pressure level.
Updates the current resource-pressure state.
Types
@type t() :: %MingaEditor.State.ResourcePressure{ low_power?: boolean(), thermal_state: thermal_state() }
@type thermal_state() :: :nominal | :fair | :serious | :critical | {:unknown, non_neg_integer()}
Thermal pressure level reported by the native GUI frontend.
Functions
@spec new() :: t()
Returns the default no-pressure state.
@spec render_delay_ms(t()) :: non_neg_integer()
Returns the minimum render debounce in milliseconds for the current pressure level.
@spec update(t(), boolean(), thermal_state()) :: t()
Updates the current resource-pressure state.