updateFrom

Copies changed rows and cursor state from reader.

The read callback is used only to copy primitive frame data into this cache. After this method returns, renderers should build glyph or text runs from the copied rows and paint from their own backend-specific state.

Parameters

reader

source of the short-lived render frame.


fun updateFrom(reader: TerminalRenderFrameReader, scrollbackOffset: Int)

Copies changed rows and cursor state for a caller-owned scrollback viewport.

scrollbackOffset is requested in lines from the live bottom viewport. The reader clamps it to available history; this cache stores the resolved value reported by the frame and treats changes to it as row-mapping changes even when line generations happen to match.

Parameters

reader

source of the short-lived render frame.

scrollbackOffset

requested lines above the live bottom viewport.


fun updateFrom(reader: TerminalRenderFrameReader, scrollbackOffset: Int, viewportRows: Int)

Copies changed rows and cursor state for a caller-owned scrollback viewport with optional render-only overscan rows.

A viewportRows value greater than zero asks the reader for that many rows without resizing terminal state. Readers clamp the resolved count before exposing TerminalRenderFrame.rows, and this cache resizes only to the resolved frame shape.

Parameters

reader

source of the short-lived render frame.

scrollbackOffset

requested lines above the live bottom viewport.

viewportRows

requested render rows, or zero for the reader default.