terminal/src/renderer/vt
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
..
lib Unify and clean up the common build properties (#3429) 2019-11-05 14:29:11 -08:00
ut_lib Merged PR 4465022: [Git2Git] Merged PR 4464559: Console: Ingest OSS changes up to e0550798 2020-03-26 01:20:36 +00:00
dirs Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
invalidate.cpp Add support for double-width/double-height lines in conhost (#8664) 2021-02-18 05:44:50 +00:00
math.cpp Eliminate more transient allocations: Titles and invalid rectangles and bitmap runs and utf8 conversions (#8621) 2021-02-16 20:52:33 +00:00
paint.cpp Standardize the color table order (#11602) 2021-11-04 22:13:22 +00:00
precomp.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
precomp.h Replace old C headers (xxx.h) with modern ones (cxxx) (#5080) 2020-07-01 11:00:24 -07:00
sources.inc Remove the WinTelnetEngine (#6526) 2020-06-17 16:29:49 +00:00
state.cpp Fix building with v143 toolchain (#10727) 2021-07-20 19:00:49 +02:00
tracing.cpp Set keyword flags on all tracelog events (#10098) 2021-05-14 23:14:26 +00:00
tracing.hpp Eliminate more transient allocations: Titles and invalid rectangles and bitmap runs and utf8 conversions (#8621) 2021-02-16 20:52:33 +00:00
vt-renderer-common.vcxitems Remove the WinTelnetEngine (#6526) 2020-06-17 16:29:49 +00:00
vtrenderer.hpp Introduce AtlasEngine - A new text rendering prototype (#11623) 2021-11-13 00:10:06 +00:00
VtSequences.cpp Standardize the color table order (#11602) 2021-11-04 22:13:22 +00:00
Xterm256Engine.cpp Add support for downloadable soft fonts (#10011) 2021-08-06 20:41:02 +00:00
Xterm256Engine.hpp Add support for downloadable soft fonts (#10011) 2021-08-06 20:41:02 +00:00
XtermEngine.cpp Add support for downloadable soft fonts (#10011) 2021-08-06 20:41:02 +00:00
XtermEngine.hpp Add support for downloadable soft fonts (#10011) 2021-08-06 20:41:02 +00:00