terminal/src
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
..
buffer Fix implicitly narrowing conversion in textBuffer (#9972) 2021-04-28 11:45:29 -05:00
cascadia Use DComp surface handle for Swap Chain management (#10023) 2021-05-12 11:54:17 -05:00
dep Move all wildcards into targets or expand them (#6406) 2020-06-08 14:01:47 -07:00
host Add a test for GH-9692/MSFT-33127449 (#10077) 2021-05-11 23:16:39 +00:00
inc Make the window name _quake special (#9785) 2021-04-26 19:36:23 +00:00
interactivity Merged PR 5984262: [Git2Git] Merged PR 5982901: Reintroduce GetQuickCharWidth for numpad event synthesis 2021-04-27 23:17:53 +00:00
internal Implement Default Terminal (#7489) 2021-03-26 17:09:49 -05:00
propsheet Merged PR 5770253: [Git2Git] Merged PR 5760120: Add propsheet chooser to Windows 2021-03-10 01:19:04 +00:00
propslib Implement UI for choosing default terminal inside Settings page (#9907) 2021-04-28 10:43:30 +00:00
renderer Use DComp surface handle for Swap Chain management (#10023) 2021-05-12 11:54:17 -05:00
server Merged PR 6034984: Fix a crash caused by improper buffer management w/ multiple clients 2021-05-11 16:56:43 +00:00
terminal Allow trailing semicolon when parsing OSC 9;4 (#10024) 2021-05-05 18:12:55 +00:00
testlist Reflect testlist change from OS 2021-03-29 15:24:43 -05:00
til Merged PR 5676675: Reflect OS build fixes on top of ae8347f33 2021-02-11 18:19:33 +00:00
tools Add a Monarch/Peasant sample app (#8171) 2021-01-19 21:55:30 +00:00
tsf Fix Korean IME to display a character being composed in conhost (#8632) 2021-01-04 21:05:24 +00:00
types Add support for double-width/double-height lines in conhost (#8664) 2021-02-18 05:44:50 +00:00
winconpty winconpty: close the pty host handle after terminating it (#8707) 2021-01-08 10:18:27 +00:00
common.build.post.props Move CI and audit build to the WinDev scale set pool (#8080) 2020-10-28 20:49:13 +00:00
common.build.pre.props Move Branding into common props (#9668) 2021-03-30 18:08:53 -05:00
common.build.tests.props Change TAEF nuget package to use new Microsoft.Taef name; Update to 10.58 release build version. (#9656) 2021-03-30 10:58:11 +00:00
ConsolePerf.regions.xml
ConsolePerf.wprp
cppwinrt.build.post.props Update C++/WinRT to 2.0.210309.3 (#9437) 2021-03-10 16:04:59 -06:00
cppwinrt.build.pre.props Update C++/WinRT to 2.0.210309.3 (#9437) 2021-03-10 16:04:59 -06:00
dirs
project.inc Merged PR 5598201: Reflect OS build changes atop a8b404463 2021-01-22 04:57:26 +00:00
project.unittest.inc Merged PR 4915530: Reflect OS Build fixes on top of 58f5d7c7 2020-07-13 23:00:53 +00:00
StaticAnalysis.ruleset Fix SA for Visual Studio 16.8 (#8551) 2020-12-11 05:04:30 +00:00
Terminal.wprp Add a WPR profile containing all of Terminal's ETW providers (#9630) 2021-03-26 11:46:14 -05:00
unit.tests.x64.runsettings
unit.tests.x86.runsettings
wap-common.build.post.props
wap-common.build.pre.props