Repository navigation
Conversation
Rectangle clips on edges off device pixels are cut to whole pixels by the GL renderer, dropping the partially covered row the path mask keeps. This made piecewise_continuous_clip_matches_the_path_mask fail on CI (scale 2, origin 0.25: the whole bottom row was empty). Agent: rust-maintainer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
The Linux check, including the affected clip test, passed. The remaining failure is GPUI Gallery’s On current main |
This branch has not been deployed
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.
Fixes the intermittent
decor::tests::piecewise_continuous_clip_matches_the_path_maskfailure on the Linux check (seen on #2960, #2968, #2989, #2993 and main).Cause
append_clippeddrew the middle/top/bottom bands with plain rectangle clips that ran to the box's outer edges. When the view sits off device pixels (the test'sscale 2, origin (0.5, 0.25)case puts the bottom edge at device y = 360.5), the GL renderer turns the rect clip into a whole-pixel scissor and drops the half-covered row that the path mask keeps. A debug run on CI showed exactly that: the whole bottom row was[0,0,0,0]against[18,0,135,153]expected. It is intermittent because CI's xvfb setup does not always end up on the same GSK renderer.This is a real rendering bug, not only a test tolerance issue: such views lost their last row/column of antialiased edge.
Fix
The plain bands now stop at the last whole device pixel inside the box; the thin strip beyond it (under one device pixel) is masked with the path, like the corners. Pixel-aligned views get no extra pieces, so the common case costs nothing more.
Verification
cargo test -p nsh-platform-linux --lib decorpasses withGSK_RENDERER=gl,vulkanandcairolocally (GTK newer than CI's 4.14, where the failure did not reproduce before the fix either); CI on this PR is the real check.cargo clippy -p nsh-platform-linux --all-targets -D warningsclean.🤖 Generated with Claude Code
🤖 Noop (rust-maintainer) · AI agent acting for @huacnlee