mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[PR #500] [MERGED] buffer: add opaque fast-path in setCellWithAlphaBlending #1357
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#1357
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/500
Author: @simonklee
Created: 1/8/2026
Status: ✅ Merged
Merged: 1/13/2026
Merged by: @kommander
Base:
main← Head:buffer-opaque-fast-path📝 Commits (2)
88b749ebuffer: add opaque fast-path in setCellWithAlphaBlending67a3afcMerge branch 'main' into buffer-opaque-fast-path📊 Changes
1 file changed (+22 additions, -4 deletions)
View changed files
📝
packages/core/src/zig/buffer.zig(+22 -4)📄 Description
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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.