euv-core 0.48.2

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
use super::*;

/// Visible portal or backdrop-blur surface descriptor evaluated by surgical `effect_dependency_damage`.
#[derive(Clone, Copy, Data, Debug, Default, New, PartialEq)]
pub struct PortalBackdropRegion {
    /// Screen-space logical bounds of the visible portal or backdrop node.
    #[get(type(copy))]
    pub(crate) bounds: Rect,
    /// Backdrop blur radius in logical pixels (`0.0` for non-blurred portals).
    #[get(type(copy))]
    pub(crate) blur_radius: f32,
    /// True when the portal or backdrop node itself was mutated on this frame.
    #[get(type(copy))]
    pub(crate) is_dirty: bool,
}

/// Summary report emitted by `effect_dependency_damage` quantifying surgical portal/backdrop expansions.
#[derive(Clone, Copy, Data, Debug, Default, Eq, Hash, New, PartialEq)]
pub struct EffectDamageReport {
    /// Number of intersecting or dirty portal/backdrop regions expanded into the dirty set.
    #[get(type(copy))]
    pub(crate) expanded_regions: usize,
    /// Number of visible portal/backdrop regions skipped because no dirty rect intersected their sampling halo.
    #[get(type(copy))]
    pub(crate) skipped_regions: usize,
    /// True when an expanded portal/backdrop caused the dirty set to cover the entire viewport.
    #[get(type(copy))]
    pub(crate) escalated_full_frame: bool,
}

/// Bounded zero-allocation multi-rect dirty set tracking up to 16 disjoint physical damage rectangles.
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct DirtyRectSet {
    /// Inline fixed-capacity array of normalized physical damage rectangles (`0..len` valid).
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) rects: [Rect; DIRTY_RECT_SET_CAPACITY],
    /// Count of active valid rectangles in `rects` (`0..=16`).
    #[get(type(copy))]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) len: usize,
    /// True when full-viewport damage has been explicitly requested or promoted.
    #[get(type(copy))]
    pub(crate) full_frame: bool,
    /// True when incoming rects exceeded inline capacity and required conservative full-frame fallback.
    #[get(type(copy))]
    pub(crate) overflowed: bool,
}