Skip to main content

Module compositor

Module compositor 

Source
Expand description

Compositing one placed region into the tile cache: the per-tile paint, temporal-conflict resolution against the per-canvas temporal index, and the diagnostics both raise (docs/ARCHITECTURE.md §七, §十 “合成与瞬态像素”).

One placement is a resumable job. Compositor::begin plans it; each Compositor::step runs until it needs something the host must fetch — a tile that is not resident (Step::NeedTile: make room with TileCache::victim and TileCache::evict, then TileCache::insert it) or a canvas’s stored temporal records (Step::NeedTemporal: Compositor::load_temporal) — and returns Step::Done with the placement’s statistics and diagnostics once it has finished. The observed frame is passed to every step, never kept.

Temporal records changed since the last flush come out of Compositor::flush, per canvas in the order the canvases were first loaded: the ids to delete, then the rows to write.

Structs§

CompositeStats
Compositor
Frame
The observed frame, its atlas label plane and its world-consistency mask (1 = consistent; None treats every pixel as consistent). All three are frame-sized.
Outcome
Placement
One placement of a region on a canvas.
TemporalFlush
Rows a flush writes for one canvas: deletions first, then the changed records with their blocks in persisted order.

Enums§

CompositeError
CompositorDiagnostic
What a placement reports; the host formats the text from the catalogue.
Step
TemporalPolicy

Constants§

CANVAS_PIXEL_BOUND
Blocks within ±2^25 of the origin are addressable: a placed rect must stay inside CANVAS_PIXEL_BOUND native pixels on either side (src/pipeline/solve/track.ts derives its pose bound from the same figure).