Skip to content

Improve Windows deferred viewport repainting with a redraw ledger - #8650

Open
rustbasic wants to merge 2 commits into
emilk:mainfrom
rustbasic:p120-1
Open

rustbasic wants to merge 2 commits into
emilk:mainfrom
rustbasic:p120-1

Conversation

@rustbasic

@rustbasic rustbasic commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Builds on the Windows redraw-ledger approach proposed by MattReid87 to prevent deferred viewports from stopping repainting when the root viewport has focus.

On Windows, redraw requests are tracked in order. When a window receives a RedrawRequested event, it is painted first, followed by older outstanding requests in order. Direct paints are limited by a 5 ms soft time budget per event; requests not reached within that budget remain in the ledger. A paint that has already started may exceed the budget.

This keeps the ledger approach while limiting how long one redraw event spends catching up on deferred viewports. The change is Windows-only.

This PR supersedes #8467.

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Preview available at https://egui-pr-preview.github.io/pr/8650-p120-1
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

View snapshot changes at kitdiff

@rustbasic

Copy link
Copy Markdown
Contributor Author

I've been testing this extensively for a week, and it works great for me!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant