TerminalRenderCache
Caller-owned primitive cache for render frames.
This cache consumes TerminalRenderFrameReader and stores copied primitive row data after the frame callback returns. It deliberately contains no backend-specific glyph runs, font state, paint objects, selection model, or UI timer logic. Swing, Compose, and other renderers can build their local layout and paint caches from this primitive data.
Cell and row planes may have spare capacity when rowCapacityReserve is non-zero. Only the prefix addressed by columns and rows is part of the current frame. The reserve lets renderers change a viewport's logical row count, for example while smooth-scroll overscan is active, without replacing the primitive arrays in the frame-update hot path.
Parameters
initial cache width in cells.
initial cache height in rows.
spare rows retained whenever primitive storage is allocated; must be non-negative.
Constructors
Properties
Last copied active buffer kind.
Packed codepoint storage referenced by clusterRefs.
Copied cluster references in row-major order. Zero means no cluster; other values pack a codepoint offset in the high 32 bits and a codepoint length in the low 32 bits.
Copied code words in row-major order. See TerminalRenderFrame.copyLine.
Convenience cursor snapshot for tests and compatibility callers.
Last copied cursor blinking mode.
Whether the most recent updateFrom call changed the cursor state.
Last copied cursor column.
Last copied cursor generation.
Last copied cursor shape.
Last copied cursor visibility.
History lines discarded due to capacity wrapping since initialization.
Copied optional public extra-attribute words in row-major order.
Last copied frame generation.
Whether any copied visible row contains SGR blinking text.
Retained history lines reported by the most recent frame.
Copied optional hyperlink identifiers in row-major order. Zero means no hyperlink.
Cached per-row render generations.
Cached per-row marker for visible cells carrying the SGR blink attribute.
Cached per-row soft-wrap flags.
Last copied color palette.
Resolved scrollback offset copied by the most recent frame.
Whether the most recent updateFrom call changed the logical frame shape.
Last copied structure generation.
Functions
Copies row data, cursor state, active buffer kind, and color palette from the given frame into this cache's primitive storage.
Returns the codepoint length encoded in ref.
Returns the codepoint offset encoded in ref.
Returns cluster text for diagnostics or compatibility callers.
Copies changed rows and cursor state from reader.
Copies changed rows and cursor state for a caller-owned scrollback viewport.
Copies changed rows and cursor state for a caller-owned scrollback viewport with optional render-only overscan rows.