Expand description
Double buffering and cell-level diffing for flicker-free rendering. Maintains screen state to enable precise, minimal updates. Double buffering and cell-level diffing for flicker-free rendering.
This module implements a double-buffering system that maintains two complete representations of the terminal screen. By comparing these buffers cell-by-cell, we can generate minimal updates that eliminate flicker entirely.
§Architecture
Current Screen Next Frame Diff Result
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Hello World │ │ Hello Rust! │ │ ^^^^ │
│ Terminal UI │ │ Terminal UI │ │ (no change) │
└─────────────┘ └─────────────┘ └─────────────┘
Front Buffer Back Buffer Cell UpdatesStructs§
- Cell
- Represents a single cell in the terminal with its visual properties.
- Cell
Style - Style attributes that can be applied to a cell.
- Double
Buffer - Double buffer system for flicker-free rendering.
- Screen
Buffer - A buffer representing the entire terminal screen as a 2D grid of cells.
Enums§
- Cell
Update - Represents an update to one or more cells.