Skip to content

Fix off-screen culling bounds applying node location twice - #1342

Merged
nicoburns merged 1 commit into
mainfrom
devin/1793340780-fix-cull-bounds
Oct 30, 2026
Merged

nicoburns merged 1 commit into
mainfrom
devin/1793340780-fix-cull-bounds

Conversation

@nicoburns

@nicoburns nicoburns commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

The paint culling in render_element built the element's border box from its parent-relative location, then unioned it with scrollable_overflow (which is element-local and already scaled) and ran the result through node_transform, which applies location again. 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_image calls 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.

@staging-devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

@nicoburns
nicoburns merged commit e42ee1f into main Oct 30, 2026
15 checks passed
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