pub struct CompiledFrame {Show 22 fields
pub strips: StripStorage,
pub recorder: CommandRecorder<EngineDraw>,
pub encoded_paints: Vec<EncodedPaint>,
pub clears: Vec<ClearPunch>,
pub lut_requests: Vec<LutRequest>,
pub fast_rect_draws: u32,
pub scissor_clips: u32,
pub mask_clips: u32,
pub image_evictions: Vec<AtlasRegion>,
pub image_uploads: Vec<ImageUpload>,
pub atlas_layers: u32,
pub image_draws: u32,
pub skipped_images: u32,
pub external_draws: u32,
pub skipped_externals: u32,
pub clip_mask_strips: usize,
pub glyph_draws: u32,
pub skipped_glyphs: u32,
pub atlas_glyph_draws: u32,
pub glyph_slots: Vec<GlyphSlot>,
pub glyph_clears: Vec<PendingClearRect>,
pub compile_spans: CompileSpans,
}Expand description
Everything one compiled frame produced.
The strips and their alpha coverage share one
StripStorage: strips.strips is the frame’s whole strip buffer (each
EngineDraw::strip_range indexes into it) and strips.alphas the alpha
runs those strips reference. They are kept together because a strip’s
packed alpha index is only meaningful against the alpha buffer generated
alongside it.
The draws themselves live in recorder.draws rather than in a field of
their own: CommandRecorder already owns that vector, and its node
ranges index into it, so a second parallel copy could only drift out of
agreement with the recording. Read them through CompiledFrame::draws.
Fields§
§strips: StripStorageThe frame’s strips and the alpha coverage they index.
recorder: CommandRecorder<EngineDraw>The recorded render graph, owning the frame’s draws.
encoded_paints: Vec<EncodedPaint>Paints too complex to inline into a draw, indexed by
Paint::Indexed.
clears: Vec<ClearPunch>The frame’s hole punches, hoisted to the root and issued at the
punch’s own painter-order position (see clear).
Deliberately not draws: a punch erases rather than paints, and keeping it out of the recording is what lets a target that disregards alpha drop the whole pass and read the frame unchanged.
lut_requests: Vec<LutRequest>The colour ramps encoded_paints needs made resident before the frame
is drawn, one per gradient entry.
Deliberately not serviced here: the compiler holds no gradient cache,
so ramp residency is decided once per frame by the renderer rather than
per draw by the walk (see paint).
fast_rect_draws: u32How many of this frame’s draws wrote their strip coverage directly as a
rectangle, bypassing flattening and tiling (see [fast_rect]).
Purely observational — nothing downstream branches on it. It exists so the fast path’s admission rule is measurable from outside the compiler rather than inferred from a strip count that both paths can produce.
scissor_clips: u32How many of this frame’s clips lowered to a scissor rectangle, costing
no rasterization at all (see clip).
mask_clips: u32How many of this frame’s clips lowered to a coverage mask.
image_evictions: Vec<AtlasRegion>Atlas regions whose texels must be cleared before this frame draws, freed by the residency reap at the head of the frame.
Serviced before image_uploads: a rectangle
freed this frame can be re-allocated in the same frame, so clearing
after writing would erase the image that just moved in.
image_uploads: Vec<ImageUpload>Atlas regions whose texels must be written before this frame draws, one per image that became resident during it.
Empty in the steady state: an image drawn on a thousand consecutive frames appears here exactly once, on the first.
atlas_layers: u32The atlas array depth this frame’s paints address — the layer count the array texture must have grown to before the uploads are written.
image_draws: u32How many of this frame’s draws painted with an atlas-backed image.
skipped_images: u32How many image draws were dropped because the image could not be made resident (unsupported format, oversized, malformed, atlas full, the same blob already resolved this frame at another extent, or the atlas disabled outright).
Observational, and the counter that makes “an image the engine cannot hold is a skipped draw, not a panicked frame” measurable rather than asserted.
external_draws: u32How many of this frame’s draws painted with an externally bound texture.
skipped_externals: u32How many external-texture draws were dropped — an id nothing is registered under, or a destination the texture cannot be mapped onto.
Observational, and the external counterpart of
skipped_images: “a texture the engine cannot
resolve is a skipped draw, not a wrongly-sampled one”, measured rather
than asserted.
clip_mask_strips: usizeHow many strips this frame’s coverage masks cost.
Observational, and the counter the clip lowering’s whole claim rests on: a frame whose clips all scissored reports zero here, which is what “a rectangular clip is free” means measured rather than asserted.
glyph_draws: u32How many of this frame’s draws painted one glyph outline.
A glyph run costs one draw per glyph that produced coverage, so this is bounded by — and usually below — the run’s own glyph count: a glyph clipped away or carrying no ink (a space) records nothing.
skipped_glyphs: u32How many glyphs were dropped because the engine has no way to paint them on this path — a colour (COLR) glyph, a bitmap-strike glyph, or a stroked outline.
Observational, and the counter that makes “a glyph the engine cannot
paint goes missing rather than landing wrong” measurable rather than
asserted, the same way skipped_images does
for images.
atlas_glyph_draws: u32How many of glyph_draws sampled the glyph atlas
rather than rasterizing an outline.
The measure of what the policy is actually buying: a page of settled text reads all-atlas, an animating size reads zero, and the difference between them is the frame’s rasterization work.
Observational only. It is not the signal for whether the atlas has
pixel work outstanding — a run whose draws were all culled still
inserted entries and dirtied a page while reporting zero here. That
question is SceneCompiler::glyph_replay_pending’s.
glyph_slots: Vec<GlyphSlot>Where each of this frame’s atlas-sampled glyphs lives, one entry per
atlas draw (see GlyphSlot).
glyph_clears: Vec<PendingClearRect>Atlas rectangles freed by the previous frame’s glyph eviction, to be zeroed before this frame writes anything into the array.
Carried a frame late deliberately: glifo evicts at the end of a frame,
and a rectangle it frees can be handed straight back out on the next
one, so clearing it after that frame’s uploads and replay would erase
whatever just moved in. Same ordering, same reason, as
image_evictions.
Reported rather than consumed, on the same terms as
image_evictions: the same rectangles appear
on every later frame until a caller that really wrote them calls
SceneCompiler::acknowledge_glyph_clears. A frame compiled and then
refused takes none of them with it.
compile_spans: CompileSpansWhat compiling this frame cost, phase by phase — all zero without
perf-trace (see CompileSpans).
Carried on the frame rather than kept on the compiler because the consumer is the renderer’s own encode-phase accounting, which already holds the frame and would otherwise have to reach back into the compiler for a number belonging to this frame alone.