Repository navigation
fix(framebuffer): Pace software rendering when vsync is unavailable - #25382
Conversation
The software renderer waited for FBIO_WAITFORVSYNC between frames but ignored its result. Virtual and many driverless framebuffers don't support it, so the ioctl returns at once and animations render frames back to back as fast as the CPU allows. Besides burning CPU, a 10 ms scroll animation then ticks 3-5 times instead of 1-2, which is why ScrollPresenterTests.OffsetsChangeWithCustomDuration fails on the Linux Framebuffer CI lane (it renders through /dev/fb0 after the DRM path falls back). When the ioctl fails, frames are now paced to 60 fps instead. Fixes #25327 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Continuous rendering on the Framebuffer head must stay around 60 fps. ScrollPresenterTests.OffsetsChangeWithCustomDuration also covers the visible effect (ViewChanged count of a 10 ms animation). Related to #25327 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Claude finished @MartinZikmund's task in 20s —— View job Review of #25382Verdict: ship. I found 0 blocking, 0 major and 0 minor issues, so I posted no inline comments.
Not blocking:
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-25382/wasm-skia-net9/index.html |
|
The build 239113 found UI Test snapshots differences: Details
|
|
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. |
|
/unobot prepare-release --commit-message-pattern "ci: Set version to '{0}'" |
GitHub Issue: closes #25327
PR Type:
🐞 Bugfix
What changed? 🚀
SoftwareRendererwaited forFBIO_WAITFORVSYNCbetween frames but ignored the ioctl's result. Virtual and many driverless framebuffers don't support it, so the call returns at once and an animation renders frames back to back as fast as the CPU allows.This is what's happening on the Linux Framebuffer CI lane. Its log shows the DRM path failing (
drmModeAddFB2 failed -22) and the app falling back toSoftware renderer initialized: 1024x768on/dev/fb0. TheInteractionTrackermoves once per frame, so a 10 ms scroll animation gets 3-5 frames, andScrollPresenterTests.OffsetsChangeWithCustomDurationsees 3-5ViewChangedevents where it allows 2. It also means a real app on such a device spins a CPU core during every animation.FrameBufferDevice.VSync()now reports whether the ioctl worked. When it doesn't, the software renderer paces frames to 60 fps (the interval other Skia hosts use) with aStopwatch-based wait. Devices with working vsync and the DRM renderer (paced by page flips) are unchanged.Testing
Given_CompositionTarget.When_FrameBuffer_Renders_Continuously_Then_Frames_Are_Paced(Framebuffer only): with a frame driver subscribed for one second, the tick count must stay at or below 75.ScrollPresenterTests.OffsetsChangeWithCustomDurationon the Linux Framebuffer lane covers the visible effect.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code