Remove canvas char atlas base class

This commit is contained in:
Daniel Imms
2022-10-02 07:19:57 -07:00
parent 53d0297898
commit 8752c4fa8e
4 changed files with 22 additions and 90 deletions
@@ -4,14 +4,13 @@
*/
import { generateConfig, configEquals } from 'browser/renderer/shared/CharAtlasUtils';
import { BaseCharAtlas } from './BaseCharAtlas';
import { DynamicCharAtlas } from './DynamicCharAtlas';
import { IColorSet } from 'browser/Types';
import { Terminal } from 'xterm';
import { ICharAtlasConfig } from 'browser/renderer/shared/Types';
interface ICharAtlasCacheEntry {
atlas: BaseCharAtlas;
atlas: DynamicCharAtlas;
config: ICharAtlasConfig;
// N.B. This implementation potentially holds onto copies of the terminal forever, so
// this may cause memory leaks.
@@ -32,7 +31,7 @@ export function acquireCharAtlas(
scaledCharWidth: number,
scaledCharHeight: number,
devicePixelRatio: number
): BaseCharAtlas {
): DynamicCharAtlas {
const newConfig = generateConfig(scaledCellWidth, scaledCellHeight, scaledCharWidth, scaledCharHeight, terminal, colors, devicePixelRatio);
// Check to see if the renderer already owns this config