Skip to content

compositing: Do not set scroll offsets of zero when restoring scroll offsets in new display lists#40757

Merged
mrobinson merged 1 commit intoservo:mainfrom
kongbai1996:reduce-send-scrolloffsets
Nov 20, 2025
Merged

compositing: Do not set scroll offsets of zero when restoring scroll offsets in new display lists#40757
mrobinson merged 1 commit intoservo:mainfrom
kongbai1996:reduce-send-scrolloffsets

Conversation

@kongbai1996
Copy link
Copy Markdown
Contributor

@kongbai1996 kongbai1996 commented Nov 20, 2025

This results in a significant reduction in the number of FrameMsg::SetScrollOffsets, which in turn greatly reduces the number of set_scroll_offsets calls in the WebRender backend. This is beneficial for performance.

Testing: This is an attempt to increase performance, so is covered by existing tests.

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 20, 2025
Copy link
Copy Markdown
Member

@mrobinson mrobinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the motivation for this change? Does it affect performance?

@kongbai1996
Copy link
Copy Markdown
Contributor Author

What is the motivation for this change? Does it affect performance?

Yes, there has been a significant reduction in the number of FrameMsg::SetScrollOffsets, which in turn greatly reduces the number of set_scroll_offsets calls in webrender_backend. This is beneficial for performance.

@mrobinson mrobinson changed the title fix(painter): skip default zero scroll offsets in transaction updates compositing: Do not set scroll offsets of zero when restoring scroll offsets in new display lists Nov 20, 2025
@mrobinson
Copy link
Copy Markdown
Member

What is the motivation for this change? Does it affect performance?

Yes, there has been a significant reduction in the number of FrameMsg::SetScrollOffsets, which in turn greatly reduces the number of set_scroll_offsets calls in webrender_backend. This is beneficial for performance.

I have added this to the PR description.

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Nov 20, 2025
@mrobinson mrobinson added this pull request to the merge queue Nov 20, 2025
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 20, 2025
Merged via the queue into servo:main with commit 6b452bd Nov 20, 2025
38 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 20, 2025
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.

3 participants