batch_ops
batch_ops
Mojo module 🡭
batch_ops
What a Canvas batch records: the op, the batch holding them, and the constructors for the ops with no geometry to gather.
These are the recording half of batching. They are plain data –
scalars and side lists, no Canvas – so that recording an op is an
append and a batch of thousands of markers costs a few amortized
growths rather than an allocation each. canvas.batch is the other
half: it walks these per row band and draws them.
They live in their own module because both halves need them and
neither owns them: canvas.buffer records, canvas.batch renders,
and canvas.shapes reaches for the op constructors when a primitive
records itself instead of drawing.