Expand description
The matrix: an ordered sequence of chunks the renderer slices.
CellMatrix is the contract between the cell-builder worker
(S2 producer, in lattice-host) and the renderers (S3 TUI, S4
GPU consumers). Published wait-free via ArcSwap inside
RenderState; the paint loop reads it once per frame.
See docs/dev/architecture/cell-grid-renderer.md § Paint loop
for the per-frame contract.
Structs§
- Cell
Matrix - The published cell matrix for a single buffer.
- Cell
Slice - Borrowed iterator over a slice of matrix rows. Created via
CellMatrix::slice. - Cell
Slice Iter - Iterator yielded by
CellSlice::iter. Walks chunks from the one containingstartand yields&CellRowrefs through toend. - Display
Slice - Borrowed slice over the interleaved (document, virtual)
display rows. Created via
CellMatrix::display_slice. - Display
Slice Iter - Iterator yielded by
DisplaySlice::iter. Walks the underlyingCellSliceIterin tandem with the virtual rows invirtual_rows, emitting them in the order:
Enums§
- Display
RowEntry - One row yielded by
DisplaySliceIter.
Constants§
- CHUNK_
SIZE_ WHOLE_ DOC - Sentinel value of
CellMatrix::chunk_sizemeaning whole-doc mode: the matrix has at most one chunk covering the entire document. Below4 × viewport_heightlines the cell-builder uses whole-doc mode (see chunking policy in the design doc).
Functions§
- wrap_
segments - Soft-wrap (W.2, A2): number of display rows a row of
col_countcolumns occupies when wrapped atwrap_widthcolumns. Floored at1(an empty row still occupies one display row) and at1whenwrap_width == 0(wrapping off). Shared by the host scroll model and both renderers so segment arithmetic is defined in exactly one place.