Repository navigation
fix(framebuffer): Draw DRM frames before flipping (6.8) - #25131
Merged
agneszitte merged 1 commit intoOct 13, 2026
Merged
agneszitte merged 1 commit into
agneszitte merged 1 commit into
Conversation
Fixes unoplatform#24505. The page-flip handler drew ahead of the next request, so each flip presented a buffer drawn before the content it answered existed, and a request arriving mid-flip was cleared before it was checked. Content updates without follow-up invalidations stayed one frame behind. Draw at the request, then flip, and track flip state in one word so a request made during a flip is always served when it lands. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit 819266d)
Contributor
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-25131/wasm-skia-net9/index.html |
ajpinedam
approved these changes
Oct 9, 2026
Contributor
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
Merged
1 task done
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.
GitHub Issue: #24505 (backport of #25060)
PR Type:
🐞 Bugfix
What changed? 🚀
Backport of #25060 to 6.8.
On the Linux framebuffer host with KMS/DRM,
DRMRendererdrew ahead of the next request. The page-flip handler pre-drew a frame, andInvalidateRenderonly swapped and flipped that buffer, so each flip showed a frame drawn before the content it was answering existed. A request that arrived while a flip was in flight could also be lost: the handler cleared the pending flag before checking it.Fix, the same as #25060:
InvalidateRenderdraws, then flips (DrawAndFlip)._flipState(idle / in flight / in flight with a request pending), changed only by compare-and-swap. A request made during a flip is always served when that flip lands.Differences from #25060: master's flip handler had already moved into
OnPageFlipCorewith a try/catch, which came from a 7.0-only commit. 6.8 keeps its staticOnPageFliphandler, with the new state logic applied in place.InvalidateRenderandDrawAndFlipare identical to master.Validation:
Uno.WinUI 6.8.0-dev.212. 16 screenshots were taken 1.7 s apart, each next to the guest clock, on a fresh boot per run./dev/dri/card0and had no/dev/fb0mapping. The sample setsUseKMSDRM(gbmSurfaceColorFormat: XR24), because virtio-gpu rejects the default ARGB8888, as noted in fix(framebuffer): Draw DRM frames before flipping #25060. Without that, the host silently falls back to the software renderer, and the bug can't show.Uno.UI.Runtime.Skia.Linux.FrameBufferbuilds onservicing/6.8.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code