Repository navigation
Fix off-screen culling bounds applying node location twice - #1342
Merged
Merged
Conversation
Contributor
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
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.
The paint culling in
render_elementbuilt the element's border box from its parent-relativelocation, then unioned it withscrollable_overflow(which is element-local and already scaled) and ran the result throughnode_transform, which applieslocationagain. The size was also left unscaled. For elements far down the page the resulting box was much larger than it should be, so after scrolling, elements well above the viewport still passed the cull and were painted.This builds the border box at the origin with a scaled size so it is in the same space as
scrollable_overflow.On a test page with 60 600x600 images (both stacked in the document and inside a scrolling flex column) at scale 2, scrolled to the bottom,
draw_imagecalls per frame drop from 30 to the 2 images that are actually visible. That matters for Vello Hybrid, where every painted image takes space in the image atlas. There's no regression test yet, and I haven't specifically checked transforms, inline images, positioned elements or background images.Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/d99ef8d20d494b5ba593ffc2cd05fb13
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/d99ef8d20d494b5ba593ffc2cd05fb13?variant=devin-insiders
WPT results
No changes in test results compared to
main.Generated by the WPT workflow.