pub struct FrameBudgetConfig {
pub total: Duration,
pub phase_budgets: PhaseBudgets,
pub allow_frame_skip: bool,
pub degradation_cooldown: u32,
pub upgrade_threshold: f32,
}Expand description
Configuration for frame budget behavior.
Fields§
§total: DurationTotal time budget per frame.
phase_budgets: PhaseBudgetsPer-phase budgets.
allow_frame_skip: boolAllow skipping frames entirely once degradation reaches
DegradationLevel::SkipFrame. A frame that has been rendered is
always presented, even when it ran over budget.
degradation_cooldown: u32Frames to wait between degradation level changes.
upgrade_threshold: f32Threshold (as fraction of total) above which we consider upgrading. Default: 0.5 (upgrade when >50% budget remains).
Implementations§
Source§impl FrameBudgetConfig
impl FrameBudgetConfig
Sourcepub fn with_total(total: Duration) -> Self
pub fn with_total(total: Duration) -> Self
Create a new config with the specified total budget.
Trait Implementations§
Source§impl Clone for FrameBudgetConfig
impl Clone for FrameBudgetConfig
Source§impl Debug for FrameBudgetConfig
impl Debug for FrameBudgetConfig
Source§impl Default for FrameBudgetConfig
impl Default for FrameBudgetConfig
Source§impl PartialEq for FrameBudgetConfig
impl PartialEq for FrameBudgetConfig
impl StructuralPartialEq for FrameBudgetConfig
Auto Trait Implementations§
impl Forget for FrameBudgetConfig
impl Freeze for FrameBudgetConfig
impl Move for FrameBudgetConfig
impl RefUnwindSafe for FrameBudgetConfig
impl Send for FrameBudgetConfig
impl Sync for FrameBudgetConfig
impl Unpin for FrameBudgetConfig
impl UnsafeUnpin for FrameBudgetConfig
impl UnwindSafe for FrameBudgetConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more