Expand description
Recording rendering commands.
Vello CPU and Vello Hybrid share a recording stage before their pipelines diverge. Their pipelines can be split into roughly three parts:
- Record rendering commands into a scene-graph-like structure.
- Turn the complete recording into renderer-specific work. Vello CPU buckets commands by strip row, while Vello Hybrid schedules draws and layer operations across intermediate textures and render passes.
- Execute that work using CPU fine rasterization or GPU render passes, respectively.
The reasons for completing the recording before renderer-specific planning differ somewhat between the two renderers:
-
Vello CPU can inline regular layers with blends, opacity, masks, or clips into their parent command stream. However, filter layers must instead be rendered separately because spatial filters might sample neighboring pixels. The complete layer must be rendered before the filter can be applied and its result composited into the parent.
-
Vello Hybrid needs to render every layer separately. Its scheduler therefore needs the complete layer hierarchy and bounds before it can allocate intermediate textures and order draws, filters, and composition operations.
-
In both renderers, filter layers might have different dimensions than the main viewport. A large blur, for example, might require rendering shapes that would normally be culled because they exceed the viewport.
The recording stage allows us to serialize the whole scene into a graph that is enrichened with metadata, allowing each renderer to “do their own thing” while providing a common intermediate representation.
Structs§
- Command
Recorder - Recorder for a scene description.
- Layer
Clip - Clip path associated with a recorded layer.
- Layer
Props - Properties for a recorded layer.
- Node
- A node in the recorded render graph.
- Open
Layer 🔒 - Recorded
Layer - Metadata and child nodes for a recorded layer.
Enums§
- Popped
Layer - Kind of layer returned by
CommandRecorder::pop_layer. - Recorded
Layer Kind - Additional metadata for regular and filter layers.
Traits§
- Drawable
- A drawable object that can report its bounding box.