Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a simpler approach to Direct2D presentation #1191

Merged
merged 6 commits into from
Sep 11, 2020
Merged

Conversation

raphlinus
Copy link
Contributor

Instead of the convoluted approach of switching between Hwnd and Dxgi flip-mode presentation swapchains, just always use a Dxgi swapchain in sequential mode. This is compatible all the way back to Windows 7 with platform update (verified on reference machine), and is free of resize artifacts. In addition, it gets rid of the crashes when resources created with one D2D render target are used with another; all render targets are created with the same factory. It should also clear up some flashing artifacts on resize that I was observing on AMD graphics cards.

Note: I plan to get this in after #1037 (willing to fix expected merge conflicts myself), but it should be mergeable now.

Fixes #1144

Always use a DXGI swapchain.

This iS WIP, pushing for experimentation.
Mostly deleting unused code, removing alternate code paths, as
everything is now a straightforward DXGI strategy.
@raphlinus raphlinus added the shell/win concerns the Windows backend label Sep 7, 2020
Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, always happy to delete code.

@cmyr cmyr added the S-ready PR is ready to merge label Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-ready PR is ready to merge shell/win concerns the Windows backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

widget_gallery example crash on Windows [scroll, resize]
2 participants