Skip to content

GUI: draw framebuffer updates without temporary pixmaps#745

Draft
moreaki wants to merge 1 commit into
VirtualBox:mainfrom
moreaki:agent/macos-frontend-repaint-overhead
Draft

GUI: draw framebuffer updates without temporary pixmaps#745
moreaki wants to merge 1 commit into
VirtualBox:mainfrom
moreaki:agent/macos-frontend-repaint-overhead

Conversation

@moreaki

@moreaki moreaki commented Jul 8, 2026

Copy link
Copy Markdown

Summary

Draw framebuffer update rectangles directly from the backing QImage instead of constructing a temporary QImage view and converting it to a QPixmap for every painted rectangle.

The direct QPainter::drawImage call preserves the existing source rectangle, logical target position, and device-pixel-ratio scaling. The patch is confined to UIFrameBufferPrivate::drawImageRect; it does not alter Dock previews, opacity, background clearing, widget attributes, update scheduling, or platform policy.

Scope

This is a draft Qt frontend performance candidate, not a functional prerequisite for the Retina/HiDPI work tracked by #742. It should remain draft—and should be closed if an isolated current-main A/B comparison does not show a repeatable benefit.

Benchmark source

The validation tool is the fixed dxmtbench functional/performance harness. Performance samples are admissible only after the same run passes its browser framebuffer, guest screenshot, host presentation/signature, launch, and graphics-log gates.

Validation

  • git diff --check: passed.
  • Full clean Darwin/Arm64 build from current origin/main with this patch in the integrated functional stack: pending after the final minimization.
  • Static geometry audit: the source origin and clipped dimensions match the former sub-image; the target dimensions divide by the same device-pixel ratio formerly assigned to the temporary pixmap.
  • Runtime correctness and isolated performance A/B at 3840x2160: pending.

Earlier measurements covered a larger combined patch and are not evidence for this minimized PR.

Refs #742.

@oracle-contributor-agreement

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the 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.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Jul 8, 2026
@moreaki
moreaki marked this pull request as ready for review July 8, 2026 08:09
@moreaki
moreaki marked this pull request as draft July 9, 2026 08:49
Draw the damaged source rectangle directly from the framebuffer QImage instead of materializing a QPixmap for every paint. Keep the macOS destination explicitly opaque before compositing so black boot frames do not become gray or transparent.

Signed-off-by: Roberto Nibali <rnibali@gmail.com>
@moreaki moreaki changed the title GUI: reduce macOS repaint and Dock preview overhead GUI: draw framebuffer updates without temporary pixmaps Jul 16, 2026
@moreaki
moreaki force-pushed the agent/macos-frontend-repaint-overhead branch from e4f1e18 to b44df3d Compare July 16, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Required At least one contributor does not have an approved Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant