Add paint-time rounded image alpha masks - #9
Merged
Merged
Conversation
wingleeio
approved these changes
Sep 14, 2026
wingleeio
left a comment
Contributor
There was a problem hiding this comment.
No blocking findings. Reviewed mask scaling, the unchanged atlas key/cropping path, default-disabled behavior, Metal/WGSL/HLSL alpha composition, and sprite layout changes. Local validation: gpui_wgpu library tests 27 passed, 2 ignored; all four HLSL host-layout tests passed when extracted unchanged into an independent Linux test harness; scoped formatting and diff checks passed. The GPUI core test target remains blocked by the existing missing IBM Plex Sans and Lilex fixtures. Native Metal and Windows execution was not available in this Linux environment; the Metal GPU/reference regression was inspected but not rerun here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an optional paint-time rounded alpha exclusion for fitted images. Moving or resizing the mask reuses the existing image atlas tile instead of rasterizing and uploading a new bitmap.
This supports the composer background in zeronsh/zeron#341, where asynchronous geometry-baked masks could lag sidebar changes and navigation.
Implementation
ImageAlphaMaskandWindow::paint_image_fitted_masked, with window-space geometry scaled to device pixels.Validation
Windows HLSL and layout tests are updated but have not run on Windows locally. The standalone GPUI core test target is blocked by missing upstream IBM Plex Sans and Lilex font fixtures. Live app motion has not been re-recorded for this renderer change.
Dependency
The app PR depends on this renderer change. No application setting or protocol migration is introduced here.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.