terminal/src/cascadia/WinRTUtils
Mike Griese 9f2d40614b
Allow ThrottledFunc to work on different types of dispatcher (#10187)
#### ⚠️ targets #10051

## Summary of the Pull Request

This updates our `ThrottledFunc`s to take a dispatcher parameter. This means that we can use the `Windows::UI::Core::CoreDispatcher` in the `TermControl`, where there's always a `CoreDispatcher`, and use a `Windows::System::DispatcherQueue` in `ControlCore`/`ControlInteractivity`. When running in-proc, these are always the _same thing_. However, out-of-proc, the core needs a dispatcher queue that's not tied to a UI thread (because the content proces _doesn't have a UI thread!_). 

This lets us get rid of the output event, because we don't need to bubble that event out to the `TermControl` to let it throttle that update anymore. 

## References
* Tear-out: #1256
* Megathread: #5000
* Project: https://github.com/microsoft/terminal/projects/5

## PR Checklist
* [x] This is a part of #1256
* [x] I work here
* [n/a] Tests added/passed
* [n/a] Requires documentation to be updated

## Detailed Description of the Pull Request / Additional comments

Fortunately, `winrt::resume_foreground` works the same on both a `CoreDispatcher` and a `DispatcherQueue`, so this wasn't too hard!

## Validation Steps Performed

This was validated in `dev/migrie/oop/the-whole-thing` (or `dev/migrie/oop/connection-factory`, I forget which), and I made sure that it worked both in-proc and x-proc. Not only that, _it wasn't any slower_!This reverts commit 04b751faa7.
2021-08-09 15:21:59 +00:00
..
inc Allow ThrottledFunc to work on different types of dispatcher (#10187) 2021-08-09 15:21:59 +00:00
LibraryResources.cpp Add support for the Command Palette (#6635) 2020-06-26 20:38:02 +00:00
packages.config Update C++/WinRT to 2.0.210309.3 (#9437) 2021-03-10 16:04:59 -06:00
pch.cpp Introduce a WinRT utils library and "checked resources" (#3350) 2019-11-01 15:47:05 -07:00
pch.h Exclude more rarely-used stuff from Windows headers (#8513) 2020-12-11 19:35:23 +00:00
ScopedResourceLoader.cpp Enable Audit Mode for WinRTUtils (#3923) 2019-12-12 13:28:32 +00:00
WinRTUtils.vcxproj Add tray icon when quake window is minimized (#10179) 2021-07-08 08:25:43 -07:00
WinRTUtils.vcxproj.filters Introduce til/latch.h, til/mutex.h and til/throttled_func.h (#10403) 2021-06-22 20:16:31 +00:00