Use a simpler approach to Direct2D presentation #1191
Merged
+106
−593
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.
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