Skip to main content

Crate cvkg_compositor

Crate cvkg_compositor 

Source
Expand description

§CVKG Compositor

Retained-mode layer orchestration engine for the CVKG UI framework.

The compositor sits between cvkg-vdom and cvkg-render-gpu, providing:

  • Material Routing: Organizes draw calls into GPU pass buckets (scene, glass, overlay).
  • Damage Tracking: Tracks which layers changed to avoid re-recording static content.
  • Layer Orchestration: Maintains a retained LayerTree with Z-sorting and hierarchy.

§Architecture

VDom → LayerTreeBuilder → CompositorEngine → SurtrRenderer
                                   │
                         ┌─────────┼─────────┐
                         ▼         ▼         ▼
                    scene_cmds  glass_cmds  overlay_cmds
                         │         │         │
                         ▼         ▼         ▼
                    ┌─────────────────────────────┐
                    │  Backdrop Capture Pipeline  │
                    │  (Scene→Blur→Composite→UI)  │
                    └─────────────────────────────┘

Re-exports§

pub use engine::CommandBuckets;
pub use engine::CompositorEngine;
pub use engine::DamageInfo;
pub use engine::RoutedDrawCommand;
pub use layer::DrawCommand;
pub use layer::Layer;
pub use layer::LayerId;
pub use layer::LayerTree;
pub use layer::Material;

Modules§

engine
Compositor Engine
layer
Layer Tree & Material Definitions

Constants§

VERSION
Current version of the cvkg-compositor crate.