Skip to main content

euv_core/render/pipeline/
struct.rs

1use super::*;
2
3/// Fluent per-frame parameter bundle for `Renderer::render_with`.
4#[derive(Clone, Copy, Data, Debug, PartialEq)]
5pub struct FrameRenderParams {
6    /// Logical viewport size.
7    #[get(type(copy))]
8    pub(crate) viewport: Size,
9    /// Active physical DPI scale factor.
10    #[get(type(copy))]
11    pub(crate) scale_factor: f32,
12    /// Surface background clear color.
13    #[get(type(copy))]
14    pub(crate) clear_color: Color,
15    /// Layout pass telemetry from the current frame.
16    #[get(type(copy))]
17    pub(crate) layout_stats: LayoutStats,
18    /// Damaged screen region requiring rasterization.
19    #[get(type(copy))]
20    pub(crate) damage: DamageRegion,
21}
22
23/// Unified multi-mode rendering facade orchestrating Auto, Software, Hardware, and Hybrid execution.
24#[derive(Data, Debug)]
25pub struct Renderer {
26    /// Active render configuration.
27    #[get(type(copy))]
28    pub(crate) config: RenderConfig,
29    /// Resolved active render mode (never `Auto`).
30    #[get(type(copy))]
31    pub(crate) active_mode: RenderMode,
32    /// Resolved active graphics backend.
33    #[get(type(copy))]
34    pub(crate) active_backend: GraphicsBackend,
35    /// Dedicated CPU software renderer instance.
36    pub(crate) software: SoftwareRenderer,
37    /// Dedicated hardware GPU instanced renderer instance.
38    pub(crate) hardware: HardwareRenderer,
39    /// Dedicated hybrid CPU-tile + GPU-compositor renderer instance.
40    pub(crate) hybrid: HybridRenderer,
41    /// Reusable frame display list.
42    pub(crate) display_list: DisplayList,
43    /// Monotonic frame counter.
44    #[get(type(copy))]
45    pub(crate) frame_index: u64,
46    /// Whether to compute full-framebuffer FNV-1a pixel hashes on each frame (enabled for headless parity tests).
47    #[get(type(copy))]
48    pub(crate) compute_pixel_hash: bool,
49    /// Telemetry from the most recent frame.
50    #[get(type(copy))]
51    pub(crate) last_stats: FrameStats,
52}