* Reuse this Output for a new frame. Zeroes the screen buffer, clears * the operation list (backing storage is retained), and caps charCache * growth. Preserving charCache across frames is the main win — most * lines don't change between renders, so tokenize + grapheme clustering * becom
(width: number, height: number, screen: Screen)
| 196 | * becomes a cache hit. |
| 197 | */ |
| 198 | reset(width: number, height: number, screen: Screen): void { |
| 199 | this.width = width |
| 200 | this.height = height |
| 201 | this.screen = screen |
| 202 | this.operations.length = 0 |
| 203 | resetScreen(screen, width, height) |
| 204 | if (this.charCache.size > 16384) this.charCache.clear() |
| 205 | } |
| 206 | |
| 207 | /** |
| 208 | * Copy cells from a source screen region (blit = block image transfer). |
nothing calls this directly
no test coverage detected