terminal/src/host/ft_host
Leonard Hecker 2353349fe5
Introduce AtlasEngine - A new text rendering prototype (#11623)
This commit introduces "AtlasEngine", a new text renderer based on DxEngine.
But unlike it, DirectWrite and Direct2D are only used to rasterize glyphs.
Blending and placing these glyphs into the target view is being done using
Direct3D and a simple HLSL shader. Since this new renderer more aggressively
assumes that the text is monospace, it simplifies the implementation:
The viewport is divided into cells, and its data is stored as a simple matrix.
Modifications to this matrix involve only simple pointer arithmetic and is easy
to understand. But just like with DxEngine however, DirectWrite
related code remains extremely complex and hard to understand.

Supported features:
* Basic text rendering with grayscale AA
* Foreground and background colors
* Emojis, including zero width joiners
* Underline, dotted underline, strikethrough
* Custom font axes and features
* Selections
* All cursor styles
* Full alpha support for all colors
* _Should_ work with Windows 7

Unsupported features:
* A more conservative GPU memory usage
  The backing texture atlas for glyphs is grow-only and will not shrink.
  After 256MB of memory is used up (~20k glyphs) text output
  will be broken until the renderer is restarted.
* ClearType
* Remaining gridlines (left, right, top, bottom, double underline)
* Hyperlinks don't get full underlines if hovered in WT
* Softfonts
* Non-default line renditions

Performance:
* Runs at up to native display refresh rate
  Unfortunately the frame rate often drops below refresh rate, due us
  fighting over the buffer lock with other parts of the application.
* CPU consumption is up to halved compared to DxEngine
  AtlasEngine is still highly unoptimized. Glyph hashing
  consumes up to a third of the current CPU time.
* No regressions in WT performance
  VT parsing and related buffer management takes up most of the CPU time (~85%),
  due to which the AtlasEngine can't show any further improvements.
* ~2x improvement in raw text throughput in OpenConsole
  compared to DxEngine running at 144 FPS
* ≥10x improvement in colored VT output in WT/OpenConsole
  compared to DxEngine running at 144 FPS
2021-11-13 00:10:06 +00:00
..
API_AliasTests.cpp Merged PR 6598109: [Git2Git] Pull Request 6508625: Update TAEF to vPack 10.63 (latest) 2021-11-09 19:21:35 +00:00
API_AliasTestsHelpers.hpp Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
API_BufferTests.cpp Merged PR 6598109: [Git2Git] Pull Request 6508625: Update TAEF to vPack 10.63 (latest) 2021-11-09 19:21:35 +00:00
API_CursorTests.cpp Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
API_DimensionsTests.cpp Merged PR 6598109: [Git2Git] Pull Request 6508625: Update TAEF to vPack 10.63 (latest) 2021-11-09 19:21:35 +00:00
API_FileTests.cpp Merged PR 6598109: [Git2Git] Pull Request 6508625: Update TAEF to vPack 10.63 (latest) 2021-11-09 19:21:35 +00:00
API_FillOutputTests.cpp Fix FillConsoleOutputCharacterA crash (#4309) 2020-02-10 14:09:08 -08:00
API_FontTests.cpp Merged PR 6598109: [Git2Git] Pull Request 6508625: Update TAEF to vPack 10.63 (latest) 2021-11-09 19:21:35 +00:00
API_InputTests.cpp Merged PR 6598109: [Git2Git] Pull Request 6508625: Update TAEF to vPack 10.63 (latest) 2021-11-09 19:21:35 +00:00
API_ModeTests.cpp inbox: reflect incoming changes up to uxp aa5182a2 (#1916) 2019-07-10 12:40:51 -07:00
API_MultipleInflightMessageTests.cpp Add a test for GH-9692/MSFT-33127449 (#10077) 2021-05-11 23:16:39 +00:00
API_OutputTests.cpp Merged PR 6598109: [Git2Git] Pull Request 6508625: Update TAEF to vPack 10.63 (latest) 2021-11-09 19:21:35 +00:00
API_PolicyTests.cpp Merged PR 6598109: [Git2Git] Pull Request 6508625: Update TAEF to vPack 10.63 (latest) 2021-11-09 19:21:35 +00:00
API_RgbColorTests.cpp Improve the legacy color conversions (#6358) 2020-06-08 19:05:06 +00:00
API_TitleTests.cpp Merged PR 6598109: [Git2Git] Pull Request 6508625: Update TAEF to vPack 10.63 (latest) 2021-11-09 19:21:35 +00:00
CanaryTests.cpp Merged PR 6598109: [Git2Git] Pull Request 6508625: Update TAEF to vPack 10.63 (latest) 2021-11-09 19:21:35 +00:00
chafa.txt Merged PR 3215853: Fix spacing/layout for block characters and many retroactively-recategorized emoji (and more!) 2019-05-02 15:29:10 -07:00
CJK_DbcsTests.cpp Introduce AtlasEngine - A new text rendering prototype (#11623) 2021-11-13 00:10:06 +00:00
Common.cpp Merged PR 6598109: [Git2Git] Pull Request 6508625: Update TAEF to vPack 10.63 (latest) 2021-11-09 19:21:35 +00:00
Common.hpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
DefaultResource.rc inbox PR 3285709: Add chafa resource into the DLL built by Windows Razzle (#912) 2019-05-20 17:06:21 -07:00
Host.FeatureTests.vcxproj Add a test for GH-9692/MSFT-33127449 (#10077) 2021-05-11 23:16:39 +00:00
Host.FeatureTests.vcxproj.filters Add a test for GH-9692/MSFT-33127449 (#10077) 2021-05-11 23:16:39 +00:00
Host.Tests.Feature.rc Merged PR 3215853: Fix spacing/layout for block characters and many retroactively-recategorized emoji (and more!) 2019-05-02 15:29:10 -07:00
InitTests.cpp Fix the feature tests with a retry (#8534) 2020-12-09 11:02:23 -08:00
Message_KeyPressTests.cpp Merged PR 6598109: [Git2Git] Pull Request 6508625: Update TAEF to vPack 10.63 (latest) 2021-11-09 19:21:35 +00:00
OneCoreDelay.cpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
OneCoreDelay.hpp Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
precomp.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
precomp.h Remove global namespaced min/max and replace it with STL min/max (#4173) 2020-01-10 13:27:05 +00:00
product.pbxproj Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
resource.h Merged PR 3215853: Fix spacing/layout for block characters and many retroactively-recategorized emoji (and more!) 2019-05-02 15:29:10 -07:00
runtest.bat Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
sources Add a test for GH-9692/MSFT-33127449 (#10077) 2021-05-11 23:16:39 +00:00
sources.dep Merged PR 4235821: [Git2Git] Reflect some sources.dep changes from OS 2020-01-31 21:27:33 +00:00
testmd.definition Reflect recent OS build changes, incl. a version of GH-10166 2021-06-09 22:57:38 +00:00