render: recycle the glyph atlas at a placed-slot count #459
No reviewers
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis!459
Loading…
Reference in a new issue
No description provided.
Delete branch "render/glyph-slot-cap-451"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The glyph slot map was emptied only when an atlas sheet filled, so its size tracked glyph area rather than entry count. A producer printing text at many tiny OSC 66 fractional sizings rasterizes each key to a pixel or two, and a 2048² sheet holds millions of those before it recycles, so PTY output alone could grow the map that far.
The sheets now also count as full at 65 536 placed slots and recycle through the same path as a filled shelf, so the frame's second walk and the thrash logging apply unchanged and the hit path is untouched. Per-entry eviction is not possible without leaking sheet space, since the shelf packer frees no single slot. The count is twice what a sheet holds of 8×16 cells, so text at a readable size still fills the sheet first; the map's table stays under 8 MiB.
A test drives more than 65 536 distinct tiny placed glyphs through a 2048² index and checks that the cap, not the sheet, triggers the one recycle, that the placed count never exceeds it, and that the newest glyph survives. Docs: pipeline.md "Atlases", security-model.md "Resource exhaustion", REQ-704, CHANGELOG.
Closes #451