Repository navigation
fix(framebuffer): Draw DRM frames before flipping - #25060
Merged
MartinZikmund merged 1 commit intoOct 8, 2026
Merged
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]>
Contributor
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-25060/wasm-skia-net9/index.html |
Contributor
|
The build 237768 found UI Test snapshots differences: Details
|
Contributor
|
|
MartinZikmund
approved these changes
Oct 7, 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. |
1 of 5 tasks
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: closes #24505
PR Type:
🐞 Bugfix
What changed? 🚀
On the Linux framebuffer host with KMS/DRM, an update that isn't followed by another invalidation (e.g. a
DispatcherTimersetting aTextBlock) was shown one update late. A focusedTextBox's caret blink masked it by invalidating continuously.Cause (
DRMRenderer):InvalidateRenderdid not draw; it swapped and flipped whatever the page-flip handler had pre-drawn after the previous flip. That buffer was drawn before the content it was answering existed.Trace from the issue's sample, one 5 s tick:
Fix:
InvalidateRenderdraws, then flips (DrawAndFlip), the same order the fbdevSoftwareRendereralready uses._flipState(idle / in flight / in flight with a pending request), changed only by compare-and-swap. A request made during a flip is always served when that flip lands. Previously it could slip between the handler's "nothing pending" check and its return to idle.OnPageFlipCoreno longer draws ahead; it serves a pending request or returns to idle.Validation:
Uno.UI.Runtime.Linux.FrameBufferon master, analyzers on.Note: a request that arrives with no flip in flight now draws on the calling thread, usually the UI thread. That thread already performed the swap and flip before this change.
PR Checklist ✅
Screenshots Compare Test Runresults.No runtime test: CI doesn't exercise
DRMRenderer. On the Linux Framebuffer lane, DRM init fails (drmModeAddFB2 failed -22) and the host falls back to the software renderer, so a test there would not cover this change.🤖 Generated with Claude Code