Skip to main content

Crate fission_render

Crate fission_render 

Source
Expand description

Display list and rendering abstraction for the Fission UI framework.

After the widget tree has been compiled to an IR and the layout engine has positioned every node, the framework flattens the result into a DisplayList – an ordered sequence of DisplayOp commands that describe exactly what to draw and in what order.

Platform backends implement the Renderer trait to consume a display list and produce pixels using whatever GPU or software rasterizer is available.

§Pipeline

CoreIR  -->  LayoutSnapshot  -->  DisplayList  -->  Renderer (Metal, Vulkan, ...)

§Graphics state model

The display list uses a save/restore stack model (like HTML Canvas or CoreGraphics). DisplayOp::Save pushes the current clip and transform onto a stack, and DisplayOp::Restore pops it. Drawing operations between a save/restore pair are affected by the clips and transforms set within that scope.

Structs§

BoxShadow
A drop shadow rendered behind a rectangle.
Color
An RGBA color with 8-bit channels.
DisplayList
An ordered list of DisplayOps ready to be consumed by a Renderer.
Fill
A solid color fill for shapes.
LayoutPoint
A 2D point in layout coordinate space.
LayoutRect
An axis-aligned rectangle: an origin point plus a size.
LayoutSize
A 2D size in layout coordinate space.
Stroke
A colored stroke (outline) with a line width.
TextRun
A contiguous run of text with a uniform style.
TextStyle
Styling properties for a run of text.

Enums§

DisplayOp
A single rendering command in a DisplayList.
ImageFit
How an image scales to fit its layout box.

Traits§

Renderer
A backend that consumes a DisplayList and produces pixels.

Type Aliases§

LayoutUnit
The scalar type used for all layout measurements.