Module ketraterm-render-cache
Renderer-owned primitive storage and leased publication of copied terminal
frames. Its sole production dependency is ketraterm-render-api; synchronization
with terminal mutation belongs to the source reader.
The public types in io.github.ketraterm.render.cache have distinct roles:
TerminalRenderCacheis a mutable, caller-owned frame copy. It retains cell planes, packed cluster codepoints, row metadata, cursor primitives, and source generations. Reader identity qualifies incremental copies. Itsimagesview retains immutable pixel resources and copied primitive placement metadata.TerminalRenderImagesprovides indexed placement reads and synchronous sink copying. Pixel resources are shared across caches; placement storage is not.TerminalRenderPublisherowns three caches. A serialized writer publishes a copied frame; readers borrow the latest cache throughreadCurrent.TerminalRenderRangeCopymakes bounded retained-range copies for worker-side analysis, with explicit absolute bounds for the sliced origin.TerminalTextRangeCopycopies bounded text and row metadata for search without rendering attributes, cursor state, or clearing spare array capacity.
Backend-specific layout, glyph runs, selection, and painting belong to renderer modules. Arrays expose cache-owned storage for reading; capacity may exceed the logical frame shape. Copying is allocation-conscious, with allocations permitted for construction, capacity growth, and shape changes.
See the consumer guide and publication contract for ownership, lifetime, failure, and concurrency rules.