Perf Improvement: use DXGI flip model #8936

Closed
opened 2026-01-31 01:41:49 +00:00 by claunia · 2 comments
Owner

Originally created by @WSLUser on GitHub (Jun 9, 2020).

Description of the new feature/enhancement

A brief history
What is the flip model? What is the alternative?

Prior to Windows 7, the only way to present content from D3D was to "blt" or copy it into a surface which was owned by the window or screen. Beginning with D3D9’s FLIPEX swap effect, and coming to DXGI through the FLIP_SEQUENTIAL swap effect in Windows 8, we’ve developed a more efficient way to put content on screen by sharing it directly with the desktop compositor, with minimal copies.

This optimization is possible thanks to the DWM (Desktop Window Manager), which is the compositor that drives the Windows desktop.

Proposed technical implementation details (optional)

Review https://docs.microsoft.com/en-us/windows/win32/direct3ddxgi/for-best-performance--use-dxgi-flip-model and linked docs.

Originally created by @WSLUser on GitHub (Jun 9, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement A brief history What is the flip model? What is the alternative? Prior to Windows 7, the only way to present content from D3D was to "blt" or copy it into a surface which was owned by the window or screen. Beginning with D3D9’s FLIPEX swap effect, and coming to DXGI through the FLIP_SEQUENTIAL swap effect in Windows 8, we’ve developed a more efficient way to put content on screen by sharing it directly with the desktop compositor, with minimal copies. This optimization is possible thanks to the DWM (Desktop Window Manager), which is the compositor that drives the Windows desktop. <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) Review https://docs.microsoft.com/en-us/windows/win32/direct3ddxgi/for-best-performance--use-dxgi-flip-model and linked docs. <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-Fix labels 2026-01-31 01:41:49 +00:00
Author
Owner

@beviu commented on GitHub (Jun 9, 2020):

I think that the terminal is already using it:
f32761849f/src/renderer/dx/DxRenderer.cpp (L431)

@beviu commented on GitHub (Jun 9, 2020): I think that the terminal is already using it: https://github.com/microsoft/terminal/blob/f32761849f716db70248854b39160cf58c22ed8d/src/renderer/dx/DxRenderer.cpp#L431
Author
Owner

@DHowett commented on GitHub (Jun 9, 2020):

Yup!

@DHowett commented on GitHub (Jun 9, 2020): Yup!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8936