Remove fill polyfill

Fixes #4241
This commit is contained in:
Daniel Imms
2022-10-31 12:24:59 -07:00
parent 02fa38c334
commit d219da480c
7 changed files with 22 additions and 131 deletions
@@ -5,7 +5,6 @@
import { createProgram, PROJECTION_MATRIX } from './WebglUtils';
import { IWebGL2RenderingContext, IWebGLVertexArrayObject, IRenderModel } from './Types';
import { fill } from 'common/TypedArrayUtils';
import { NULL_CELL_CODE } from 'common/buffer/Constants';
import { Terminal } from 'xterm';
import { IRasterizedGlyph, IRenderDimensions, ITextureAtlas } from 'browser/renderer/shared/Types';
@@ -225,7 +224,7 @@ export class GlyphRenderer extends Disposable {
// Exit early if this is a null character, allow space character to continue as it may have
// underline/strikethrough styles
if (code === NULL_CELL_CODE || code === undefined/* This is used for the right side of wide chars */) {
fill(array, 0, $i, $i + INDICES_PER_CELL - 1 - CELL_POSITION_INDICES);
array.fill(0, $i, $i + INDICES_PER_CELL - 1 - CELL_POSITION_INDICES);
return;
}
+2 -3
View File
@@ -4,7 +4,6 @@
*/
import { IRenderModel } from './Types';
import { fill } from 'common/TypedArrayUtils';
import { ISelectionRenderModel } from 'browser/renderer/shared/Types';
import { createSelectionRenderModel } from 'browser/renderer/shared/SelectionRenderModel';
@@ -35,7 +34,7 @@ export class RenderModel implements IRenderModel {
}
public clear(): void {
fill(this.cells, 0, 0);
fill(this.lineLengths, 0, 0);
this.cells.fill(0, 0);
this.lineLengths.fill(0, 0);
}
}