use super::*;
#[derive(Clone, Copy, Data, Debug, Default, Eq, Hash, New, PartialEq)]
pub struct RenderResourceHandle {
#[get(type(copy))]
pub(crate) id: u64,
#[get(type(copy))]
pub(crate) generation: u32,
#[get(type(copy))]
pub(crate) kind: RenderResourceKind,
#[get(type(copy))]
pub(crate) byte_size: usize,
#[get(type(copy))]
pub(crate) fence_id: u64,
}
#[derive(Clone, Copy, Debug, Getter, New, PartialEq)]
pub struct RenderSemanticsContract {
#[get(type(copy))]
pub(crate) color_space: ColorSpace,
#[get(type(copy))]
pub(crate) antialiasing: AntialiasingMode,
#[get(type(copy))]
pub(crate) premultiplied_alpha: bool,
#[get(type(copy))]
pub(crate) shadows_enabled: bool,
#[get(type(copy))]
pub(crate) backdrop_blur_enabled: bool,
#[get(type(copy))]
pub(crate) clipping_enabled: bool,
#[get(type(copy))]
pub(crate) resolution_scale: f32,
}
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct FallbackPolicyConfig {
#[get(type(copy))]
pub(crate) min_dwell_ms: u64,
#[get(type(copy))]
pub(crate) overrun_streak_threshold: u32,
#[get(type(copy))]
pub(crate) recovery_streak_threshold: u32,
#[get(type(copy))]
pub(crate) recovery_budget_ratio: f32,
#[get(type(copy))]
pub(crate) max_gpu_recovery_attempts: u32,
#[get(type(copy))]
pub(crate) allow_cadence_step_down: bool,
}
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct FallbackPolicyEngine {
#[get(type(copy))]
pub(crate) config: FallbackPolicyConfig,
#[get(type(copy))]
pub(crate) display_refresh_hz: f32,
#[get(type(copy))]
pub(crate) active_cadence_hz: f32,
#[get(type(copy))]
pub(crate) last_cadence_change_ms: u64,
#[get(type(copy))]
pub(crate) has_cadence_changed: bool,
#[get(type(copy))]
pub(crate) overrun_streak: u32,
#[get(type(copy))]
pub(crate) under_budget_streak: u32,
#[get(type(copy))]
pub(crate) prefetch_enabled: bool,
#[get(type(copy))]
pub(crate) cache_retain_ratio: f32,
#[get(type(copy))]
pub(crate) gpu_recovery_attempts: u32,
#[get(type(copy))]
pub(crate) cpu_reference_forced: bool,
#[get(type(copy))]
pub(crate) last_action: FallbackAction,
#[get(type(copy))]
pub(crate) active_ladder_step: FallbackLadderStep,
#[get(type(copy))]
pub(crate) total_cadence_steps: u64,
#[get(type(copy))]
pub(crate) total_cache_trims: u64,
#[get(type(copy))]
pub(crate) total_cpu_fallbacks: u64,
#[get(type(copy))]
pub(crate) semantics_baseline: RenderSemanticsContract,
}
#[derive(Clone, Copy, Data, Debug, Default, Eq, Hash, PartialEq)]
pub struct SurfacePresentState {
#[get(type(copy))]
pub(crate) surface_generation: u64,
#[get(type(copy))]
pub(crate) last_outcome: FrameSubmitOutcome,
#[get(type(copy))]
pub(crate) last_present_outcome: PresentOutcome,
#[get(type(copy))]
pub(crate) pending_retry_generation: u64,
#[get(type(copy))]
pub(crate) has_pending_retry: bool,
#[get(type(copy))]
pub(crate) retry_attempts: u32,
#[get(type(copy))]
pub(crate) total_submitted: u64,
#[get(type(copy))]
pub(crate) total_skipped: u64,
#[get(type(copy))]
pub(crate) total_wait_in_flight: u64,
#[get(type(copy))]
pub(crate) total_failed: u64,
#[get(type(copy))]
pub(crate) last_present_timestamp_ns: u64,
#[get(type(copy))]
pub(crate) has_present_timestamp: bool,
}