engine::piet_render_context
Structs
PietLayerRenderer
Retained metadata for one piet-backed browser canvas surface.
PietLayerTarget
Current piet surface set for one logical layer.
PietRenderer
RenderContext implementation backed by piet.
Implementations
new
pub fn new(layer_factory: impl Fn(usize) -> (PietLayerTarget<S>, Box<dyn Fn() -> LayerSurfaceLayout>) + 'static) -> Self
Create a piet renderer with a chassis-provided logical layer factory.
Traits
PietSurface
Chassis operations missing from Piet's portable API: reusable transparent surfaces and source-over composition with one opacity for the complete image.
Functions
fill_to_piet_brush
pub fn fill_to_piet_brush(fill: &Paint, rect: Rect) -> Option<PaintBrush>
Resolves a single paint to a Piet brush. Mixtures require the chassis paint accumulator, since generic Piet has no additive compositing operation.