Add a basic dynamic character atlas implementation

This adds a very minimal implementation of DynamicCharAtlas using a LRU
cache.

I've got some optimizations that I'll add on top of this, but this
proves the concept.
This commit is contained in:
Benjamin Woodruff
2018-04-15 18:49:07 -07:00
parent 8c980bc30d
commit 24feaabd9a
9 changed files with 226 additions and 13 deletions
+5 -1
View File
@@ -69,11 +69,15 @@ declare module 'xterm' {
* - 'none': Don't use an atlas.
* - 'static': Generate an atlas when the terminal starts or is reconfigured. This atlas will
* only contain ASCII characters in 16 colors.
* - 'dynamic': Generate an atlas using a LRU cache as characters are requested. Limited to
* ASCII characters (for now), but supports 256 colors. For characters covered by the static
* cache, it's slightly slower in comparison, since there's more overhead involved in
* managing the cache.
*
* Currently defaults to 'static'. This option may be removed in the future. If it is, passed
* parameters will be ignored.
*/
experimentalCharAtlas?: 'none' | 'static';
experimentalCharAtlas?: 'none' | 'static' | 'dynamic';
/**
* The font size used to render text.