Repository navigation
feat(render): wire term-state snapshots into the grid render pipeline - #25
Merged
Merged
Conversation
Consume bitty-term-state public Snapshot+Damage (ADR-0003 rule 3) and produce owned DrawList frame records: SnapshotDamage converts grid damage to pixel regions for plan_frame; a per-cell walk emits background/decoration fills and glyph instances honoring width(1|2)/spacer cells; glyphs cache through GlyphCache/RasterKey and upload into a shelf-packed GlyphAtlas with deterministic wholesale eviction, drainable upload queue, CPU coverage texture, and inline fallback for oversized bitmaps. The sw-fallback feature exercises the SAME pipeline headlessly end to end (snapshot -> FramePlan -> DrawList -> RGBA surface); integration tests prove incremental damage accumulation equals a full redraw byte-for-byte and that output is byte-deterministic across runs. GlyphCache gains hit/miss counters; RenderCounters/atlas stats instrument cells drawn, glyphs rasterized, atlas hits/misses against performance-budget-rfc PB-4/PB-6/PB-7 without claiming compliance. Closes #22 CarryCtx: CTX-0016
extent_for and the cell-placement products multiplied in u64 before the u32 clamp; hostile dimensions could overflow the intermediate and panic under overflow checks (caught by CI). Route every product through saturating_mul so the documented saturating contract holds under any build profile.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #22
CarryCtx task: CTX-0016 (branch
ctx-0016/feat-render-grid-pipeline, worktree.worktrees/ctx-0016-feat-render-grid-pipeline).What
Wires bitty-term-state snapshots into the bitty-render grid pipeline per ADR-0003 dependency rule 3 (public Snapshot/Damage surface only; no term-state mutation):
grid::SnapshotDamage: grid-coordinate damage -> pixel regions for the existingplan_frame(scrollback ranges contribute no pixels on the active-screen surface; over-damage clips safely)GridRenderer::render: Snapshot + Damage -> FramePlan -> ownedDrawList(fills + glyph instances), per-cell background repaint so incremental frames union to a full redrawRasterKey/GlyphCache+ shelf-packedGlyphAtlas: CPU coverage texture, drainable upload queue, wholesale eviction on exhaustion, inline fallback for oversized bitmapssw-fallbackexercises the SAME pipeline headlessly end-to-end (snapshot bytes in -> RGBA buffer out)Deliberately deferred and documented: cursor visuals, scrollback viewport rendering, shaping/color fonts (text RFC).
Evidence
just checkgreen locally (fmt, clippy -D warnings, workspace tests, actionlint, markdownlint)--features sw-fallback