Skip to content

Conversation

@simonklee
Copy link
Contributor

Most rendered cells are fully opaque, yet the blending path unconditionally calls get() + blendCells() for every cell.

This adds an opaque check to skip blending in the common case.

For the raw variant, the only caller is the graphemeAware=false branch in drawFrameBuffer, so grapheme chars should never appear. I made this contract explicit by replacing the grapheme fallback with debug asserts, avoiding per-cell overhead in release builds.

Most rendered cells are fully opaque, yet the blending path
unconditionally calls get() + blendCells() for every cell.

This commit adds an opaque check to skip blending in the common
case.

For the raw variant, the only caller is the graphemeAware=false branch
in drawFrameBuffer, so grapheme chars should never appear. I made
this contract explicit by replacing the grapheme fallback with debug
asserts, avoiding per-cell overhead in release builds.
@simonklee simonklee force-pushed the buffer-opaque-fast-path branch from 71f414b to 14782a6 Compare January 9, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant