GUI: batch framebuffer update notifications#767
Draft
moreaki wants to merge 1 commit into
Draft
Conversation
|
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
Accumulate overlapping guest dirty rectangles in a QRegion and deliver them from one queued GUI-thread callback instead of queuing one cross-thread signal per update. Signed-off-by: Roberto Nibali <rnibali@gmail.com>
moreaki
force-pushed
the
agent/gui-framebuffer-update-batching
branch
from
July 16, 2026 15:58
2bc0f87 to
a389e03
Compare
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.
Summary
Coalesce overlapping guest framebuffer update notifications in the Qt frontend before forwarding them to the machine view.
NotifyUpdateandNotifyUpdateImagerectangles in aQRegionwhile holding the framebuffer's existing lock.UIMachineView::sltHandleNotifyUpdatepath.The change is confined to
UIFrameBuffer.cpp; it does not alter painting policy, widget attributes, or the dirty-rectangle coordinate conversion.Why
This is a draft performance candidate. The macOS/Arm VMSVGA DX11 path can emit bursts of guest updates at HiDPI and 4K sizes. Coalescing overlapping rectangles may reduce queued cross-thread signal traffic without changing the existing view-update path.
No performance benefit is claimed yet. The PR should remain draft—and should be closed if it does not show a repeatable improvement in an isolated current-main A/B comparison.
Validation
git diff --checkorigin/mainat this minimized patch tip: pending in the pinned comparison build.dxmtbenchfunctional gate at 3840x2160 in a Windows 11 Arm guest.The performance comparison will use identical current-main-based builds and will treat any rendering, signature, context, launch, or graphics-log alert as a failed sample rather than performance evidence.
Additional lifecycle gate
The coalescing callback is queued to
UIFrameBufferPrivateand then forwards through the current rawm_pMachineViewafter releasing the framebuffer lock. The former queued signal used the machine view itself as the Qt receiver, so view destruction automatically discarded pending deliveries. Before this draft can be considered valid, it must therefore also survive repeated windowed/fullscreen view replacement and shutdown while updates are queued, with no stale rectangle delivered to a replacement view and no use-after-free. A 4K steady-state benchmark alone is insufficient for that lifecycle check.