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.
- Display
List - An ordered list of
DisplayOps ready to be consumed by aRenderer. - Fill
- A solid color fill for shapes.
- Layout
Point - A 2D point in layout coordinate space.
- Layout
Rect - An axis-aligned rectangle: an origin point plus a size.
- Layout
Size - 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.
- Text
Style - Styling properties for a run of text.
Enums§
- Display
Op - A single rendering command in a
DisplayList. - Image
Fit - How an image scales to fit its layout box.
Traits§
- Renderer
- A backend that consumes a
DisplayListand produces pixels.
Type Aliases§
- Layout
Unit - The scalar type used for all layout measurements.