Merge branch 'master' into more_naming_conventions
This commit is contained in:
@@ -9,7 +9,7 @@ import { ICharAtlasConfig } from '../../shared/atlas/Types';
|
||||
|
||||
export function generateConfig(scaledCharWidth: number, scaledCharHeight: number, terminal: ITerminal, colors: IColorSet): ICharAtlasConfig {
|
||||
// null out some fields that don't matter
|
||||
const clonedColors = {
|
||||
const clonedColors = <IColorSet>{
|
||||
foreground: colors.foreground,
|
||||
background: colors.background,
|
||||
cursor: null,
|
||||
|
||||
@@ -11,7 +11,7 @@ interface ILinkedListNode<T> {
|
||||
}
|
||||
|
||||
export default class LRUMap<T> {
|
||||
private _map = {};
|
||||
private _map: { [key: string]: ILinkedListNode<T> } = {};
|
||||
private _head: ILinkedListNode<T> = null;
|
||||
private _tail: ILinkedListNode<T> = null;
|
||||
private _nodePool: ILinkedListNode<T>[] = [];
|
||||
|
||||
@@ -19,6 +19,10 @@ export default class StaticCharAtlas extends BaseCharAtlas {
|
||||
const canvas = this._document.createElement('canvas');
|
||||
canvas.width = width;
|
||||
canvas.height = height;
|
||||
|
||||
// This is useful for debugging
|
||||
// document.body.appendChild(canvas);
|
||||
|
||||
return canvas;
|
||||
}
|
||||
|
||||
@@ -65,6 +69,9 @@ export default class StaticCharAtlas extends BaseCharAtlas {
|
||||
if (!this._isCached(glyph, colorIndex)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ctx.save();
|
||||
|
||||
// ImageBitmap's draw about twice as fast as from a canvas
|
||||
const charAtlasCellWidth = this._config.scaledCharWidth + CHAR_ATLAS_CELL_SPACING;
|
||||
const charAtlasCellHeight = this._config.scaledCharHeight + CHAR_ATLAS_CELL_SPACING;
|
||||
@@ -86,6 +93,8 @@ export default class StaticCharAtlas extends BaseCharAtlas {
|
||||
this._config.scaledCharHeight
|
||||
);
|
||||
|
||||
ctx.restore();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user