Repository navigation
Windows: frames: occlusion asked when drawing, no steady presents, one queued frame - #844
Merged
Merged
Conversation
…e queued frame - Occlusion: the rune-occlusion thread and its SetWinEventHooks are gone. platform/win32/occlusion.rs is a query (Chromium's z-order walk, minimised, cloaked, locked); window/look.rs is the machine: a frame looks when the last look is over 250 ms old or the window's own move, size or focus made it stale, and the pointer reaching the window counts as seen. A covered window runs no motion and still draws what changed, settled (CoveredDraw); only a covered window with a loop on screen looks again, every 250 ms. WakeEvent::Covered is replaced by WakeEvent::FrameSlot. - Steady (a second of presents every refresh after each change, for windowed G-SYNC, hex#689) is removed: on a fixed-rate panel it changed nothing on screen. On an NVIDIA display adapter the swap chain composites premultiplied for good instead (cpu_frame::vrr_guard, VideoLayers::hold_premultiplied), which keeps G-SYNC off with no frames. - Windows swap chains hold one frame (FRAME_LATENCY); wgpu doesn't wait on the waitable (DontWait). window/slot.rs takes the swap chain's room at the frame's start, or registers a one-shot thread-pool wait that asks for the frame when there is room, so input that arrives meanwhile is in it.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This was referenced Nov 13, 2026
This was referenced Nov 23, 2026
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.
On Windows, a window now draws only when it has something new to show, and stays asleep while it doesn't.
acquire. Input that arrives during the wait goes into that frame.Measured on a 240 Hz Iris Xe laptop (release, visible desktop). Keys are posted into OpenCode's composer, and Desktop Duplication finds the frame that shows each one:
For comparison, a bare D3D11 window on the same present path takes 3,314-6,023 µs p50.