Skip to main content

Module display

Module display 

Source
Expand description

The display list: drawing commands in chunks — one per scene node, in the node’s own coordinates — under property trees, and the two-level index over them. A command doesn’t nest layers; it names its clip and its effect, and paint opens and closes exactly the layers each command it paints needs, so any subset of the list paints in order. Every tile, PNG band and click goes through here.

Re-exports§

pub use crate::tree::Order;

Structs§

Arena
A store of property-tree nodes whose slots are reused.
Builder
Builds one chunk’s commands, turning the layers they are drawn in into property-tree nodes under the chunk’s transform.
Chunk
One scene node’s own commands, in its own coordinates, and their index.
Clip
A clipping shape, in the coordinates of its transform node.
Command
A drawing command and the property state it is drawn under: its clip and its effect, if any. Its transform is its chunk’s.
Counted
A multiset of numbers that knows its least and greatest in log time.
Counts
A child’s entries in its run’s counted sets.
Effect
A layer: its blend, the bound nothing in it reaches — in its transform’s coordinates, or, when None, the whole area being painted — and the clip it is drawn inside.
Frame
A node’s box after layout, in the scene’s pixels.
Glyph
One glyph of a run: its id in its font and where its origin sits, in the run’s coordinates.
Hit
What a click on a node does, and where it lands: its box in the design’s coordinates, cut by its clipping frames.
List
The display list: chunks by paint order, the property trees, and the index over the chunks — the design’s own space, and a space for each child of each run.
Made
The property-tree nodes a chunk’s own layers made.
Placed
A child of a run as the run’s sums see it: its size along the run, where it sits across, and what it reaches and covers along the run from its unrounded start.
Run
A run’s children placed along it, and what they paint.
SpaceIndex
One space’s index: its chunks and runs by their bounds in its own coordinates, and the extent of what its chunks cover.
Span
A stretch of a run’s children: how many, and the sum of their sizes — how far they advance less the gaps, which are the run’s.
Transform
A scene node’s place: its offset from its parent’s — or, for a child of a run, the run’s place for it, read from the run’s prefix sums whenever it is asked for, so a sibling’s change of size moves it without touching it.
Trees
The three property trees.

Enums§

Blend
How an effect’s layer meets what is under it.
Draw
One drawing command, in its chunk’s coordinates: what both vello backends replay. Every decision about the drawing is made before a command is made; a backend only translates it into its library’s call. The layers it is drawn in are nodes of the property trees, not commands.
Paint
What a Draw::Fill covers its path with.
Space
Where a chunk’s coordinates are: the design’s own, or a run’s child’s, whose origin is the child’s box’s top-left.

Traits§

Target
What a backend does with the commands paint hands it, each already under the transform from its coordinates to the target’s pixels. A backend translates each into its library’s call and decides nothing.

Functions§

paint
The engine’s one paint entry point: area of the list — in the design’s coordinates — at scale device pixels per design pixel into target, whose top-left is the area’s. The commands that touch it, in paint order, each under exactly the layers its property state needs.

Type Aliases§

Id
A node in one of the property trees, by its slot.
RunId
A run, by its slot.