engine::pax_gpu_render_context
Structs
LayerRenderer
Retained renderer bound to one physical surface tile for a logical layer.
Implementations
new
pub fn new(key: String, host_signature: String, renderer: WgpuRenderer<'static>, origin_x: f32, origin_y: f32, logical_width: f32, logical_height: f32, surface_width: u32, surface_height: u32, dpr: [f32; 2]) -> Self
Create a renderer wrapper with its current tile geometry.
renderer_mut
pub fn renderer_mut(&mut self) -> &mut WgpuRenderer<'static>
Access the underlying retained pax-gpu renderer.
sync_layout_metadata
pub fn sync_layout_metadata(&mut self, surface: &LayerSurfaceEntry)
Update the retained layout metadata after the owner has already applied matching backend surface/view transforms.
LayerTarget
Current renderer set for one logical layer.
Implementations
new
pub fn new(renderers: Vec<LayerRenderer>, active: bool) -> Self
Create a layer target from physical surface renderers.
renderers_mut
pub fn renderers_mut(&mut self) -> &mut [LayerRenderer]
Mutable access to each physical renderer backing this logical layer.
PaxGpuRenderer
Runtime RenderContext implementation backed by pax-gpu/wgpu.
Implementations
new
pub fn new(layer_factory: impl Fn(usize) -> Pin<Box<dyn Future>> + 'static) -> Self
Create a renderer that lazily asks the chassis for layer backends.
Enums
RenderLayerState
Lifecycle state for a lazily-created render layer.
Variants
Pending
Failed
Ready((LayerTarget, Pin<Box<dyn Fn() -> LayerSurfaceLayout>>))
Functions
convert_kurbo_to_lyon_path
pub fn convert_kurbo_to_lyon_path(kurbo_path: &BezPath) -> Path
Convert a kurbo path emitted by primitives into a lyon path consumed by pax-gpu.
to_pax_gpu_color
pub fn to_pax_gpu_color(color: &Color) -> Color
Convert a runtime API color into the pax-gpu render-context color.