Repository navigation
Conversation
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.
Tested on:
GDI blits go straight into the surface that DWM composes from, so a composition during a present can show the top of a new frame over the bottom of the old one. Slint's software renderer tears like this while scrolling (slint-ui/slint#15023). This presents through a flip model swap chain on a WARP device instead, the way Chromium's software output does on Windows 11.
Present1as dirty rectangles.windows-syshas no COM interfaces and thewindowscrate needs Rust 1.82, so the few Direct3D methods are declared by hand, with vtables checked against thewindowscrate.The new tests draw into real windows and read back what DWM shows. They pass on GitHub's Windows Server 2022 and 2025 runners (x86_64 and i686) and on the Windows 11 arm64 runner, and they fail when the damage copy is removed.
On those runners presenting took as long as with GDI and never waited for vblank, and minimized or hidden windows kept their frames. An 800x600 surface used about 0.3 MiB more private memory and 2 MiB more working set, which is the swap chain's extra buffer. Since a restored window keeps its content, #375 now only matters for the GDI path, and the device context thread only starts for GDI (#250). Outside a buffer smaller than the window, the window shows black instead of white.
This follows the review of slint-ui/slint#15027, where Slint presented through DXGI itself.