Skip to content

Simplify window image-depth calculation - #1301

Open
toprameen wants to merge 1 commit into
bendlang:mainfrom
toprameen:simplify-window-depth
Open

toprameen wants to merge 1 commit into
bendlang:mainfrom
toprameen:simplify-window-depth

Conversation

@toprameen

Copy link
Copy Markdown
Contributor

Both native window_show paths calculated image depth with a shift loop. They now use the existing cls_fit helper on the larger dimension, preserving the smallest power-of-two square covering the window.

Local checks: native macOS graphics output matches the baseline; emitted JS is byte-identical and passes. Extracted old/new depth blocks agree on 251,177 dimension cases under UBSan. The repository gate passes 50/50, and git diff --check passes.

@toprameen
toprameen marked this pull request as ready for review October 3, 2026 22:21
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