terminal/src/cascadia
Mike Griese 9f45963e73
Use DComp surface handle for Swap Chain management (#10023)
## Summary of the Pull Request

This PR changes the DxEngine to create a swapchain HANDLE, then have the TermControl attach _that_ handle to the SwapChainPanel, rather than returning the swapchain via a `IDXGISwapChain1`.

I didn't write this code originally, @miniksa helped me out. The original commit was so succinct that I didn't think there was anything else to add or take away.

I'm going to need this for tear-out (#1256), so that I can have the content process create swap chain handles, then duplicate those handles out to the window process that will end up embedding the content.

## References

* [`DCompositionCreateSurfaceHandle`](https://docs.microsoft.com/en-us/windows/win32/api/dcomp/nf-dcomp-dcompositioncreatesurfacehandle)
* [`CreateSwapChainForCompositionSurfaceHandle`](https://docs.microsoft.com/en-us/windows/win32/api/dxgi1_3/nf-dxgi1_3-idxgifactorymedia-createswapchainforcompositionsurfacehandle)
* [`CreateSwapChainForComposition`](https://docs.microsoft.com/en-us/windows/win32/api/dxgi1_2/nf-dxgi1_2-idxgifactory2-createswapchainforcomposition)
* Tear-out: #1256
* Megathread: #5000
* Project: https://github.com/microsoft/terminal/projects/5

## PR Checklist
* [x] Closes https://github.com/microsoft/terminal/projects/5#card-50760249
* [x] I work here
* [ ] Tests added/passed
* [n/a] Requires documentation to be updated

## Detailed Description of the Pull Request / Additional comments

This reverts commit c113b65d9b.

That commit reverted 30b8335479

## Validation Steps Performed

* [x] Built and ran the Terminal, it still seems to work
* [x] Does a TDR still work? or do we need to recreate the handle, or something.
* [x] Does this work on Win7? I honestly have no idea how DX compatibility works. Presumably, the WPF version uses the `ForHwnd` path, so this will still work, but I don't know if this will suddenly fail to launch on Win7 or something. Tagging in @miniksa.
2021-05-12 11:54:17 -05:00
..
CascadiaPackage Remove bug fixes which aren't needed in VS 16.9 (#9953) 2021-04-28 10:43:05 +00:00
inc Add globalSummon action (#9854) 2021-04-28 17:13:28 -05:00
LocalTests_SettingsModel Introduce ActionMap to Terminal Settings Model (#9621) 2021-05-04 21:50:13 -07:00
LocalTests_TerminalApp Introduce ActionMap to Terminal Settings Model (#9621) 2021-05-04 21:50:13 -07:00
PublicTerminalCore Exclude more rarely-used stuff from Windows headers (#8513) 2020-12-11 19:35:23 +00:00
Remoting When the window is summoned and is already active, minimize it. (#9963) 2021-04-28 18:57:14 -05:00
ShellExtension Move Branding into common props (#9668) 2021-03-30 18:08:53 -05:00
TerminalApp In specific scenarios, focus the active control (#10048) 2021-05-11 23:55:49 +00:00
TerminalAzBridge Update C++/WinRT to 2.0.210309.3 (#9437) 2021-03-10 16:04:59 -06:00
TerminalConnection Add names to threads to make debugging a slight bit easier (#9801) 2021-04-14 10:56:52 +00:00
TerminalControl Use DComp surface handle for Swap Chain management (#10023) 2021-05-12 11:54:17 -05:00
TerminalCore Allow trailing semicolon when parsing OSC 9;4 (#10024) 2021-05-05 18:12:55 +00:00
TerminalSettingsEditor Keep the last selected pivot active when navigating over profile pages (#10047) 2021-05-07 04:13:06 +00:00
TerminalSettingsModel Introduce ActionMap to Terminal Settings Model (#9621) 2021-05-04 21:50:13 -07:00
UnitTests_Control First three interactivity fixes (#9980) 2021-05-04 22:54:02 +00:00
UnitTests_Remoting When the window is summoned and is already active, minimize it. (#9963) 2021-04-28 18:57:14 -05:00
UnitTests_TerminalCore Allow trailing semicolon when parsing OSC 9;4 (#10024) 2021-05-05 18:12:55 +00:00
ut_app Introduce ActionMap to Terminal Settings Model (#9621) 2021-05-04 21:50:13 -07:00
WindowsTerminal Introduce ActionMap to Terminal Settings Model (#9621) 2021-05-04 21:50:13 -07:00
WindowsTerminalUniversal Rename Microsoft.Terminal.TerminalControl to .Control; Split into dll & lib (#9472) 2021-03-17 20:47:24 +00:00
WinRTUtils Remove bug fixes which aren't needed in VS 16.9 (#9953) 2021-04-28 10:43:05 +00:00
WpfTerminalControl [WPF] Allows setting the WPF control background when setting the terminal theme (#10026) 2021-05-04 21:18:25 +00:00
WpfTerminalTestNetCore Auto-format our XAML files and enforce in CI (#9589) 2021-03-29 17:09:38 -05:00
wt Build and ship an actual binary named wt that just launches WT (#6860) 2020-07-10 22:41:37 +00:00
CascadiaResources.build.items Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00