Merge branch 'typedarray_BufferLine' of git+ssh://github.com/jerch/xterm.js into typedarray_BufferLine

This commit is contained in:
Jörg Breitbart
2018-09-13 19:30:50 +02:00
5 changed files with 15 additions and 5 deletions
+1 -1
View File
@@ -209,7 +209,7 @@ function initOptions(term: TerminalType): void {
fontWeight: ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'],
fontWeightBold: ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'],
rendererType: ['dom', 'canvas'],
bufferLineConstructor: ['JsArray', 'TypedArray']
experimentalBufferLineImpl: ['JsArray', 'TypedArray']
};
const options = Object.keys((<any>term)._core.options);
const booleanOptions = [];
+1 -1
View File
@@ -126,7 +126,7 @@ export class Buffer implements IBuffer {
* Clears the buffer to it's initial state, discarding all previous data.
*/
public clear(): void {
this.setBufferLineFactory(this._terminal.options.bufferLineConstructor);
this.setBufferLineFactory(this._terminal.options.experimentalBufferLineImpl);
this.ydisp = 0;
this.ybase = 0;
this.y = 0;
+2 -2
View File
@@ -106,7 +106,7 @@ const DEFAULT_OPTIONS: ITerminalOptions = {
theme: null,
rightClickSelectsWord: Browser.isMac,
rendererType: 'canvas',
bufferLineConstructor: 'JsArray'
experimentalBufferLineImpl: 'JsArray'
};
export class Terminal extends EventEmitter implements ITerminal, IDisposable, IInputHandlingTerminal {
@@ -493,7 +493,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
}
break;
case 'tabStopWidth': this.buffers.setupTabStops(); break;
case 'bufferLineConstructor':
case 'experimentalBufferLineImpl':
this.buffers.normal.setBufferLineFactory(value);
this.buffers.alt.setBufferLineFactory(value);
break;
-1
View File
@@ -263,7 +263,6 @@ export interface ITerminalOptions extends IPublicTerminalOptions {
screenKeys?: boolean;
termName?: string;
useFlowControl?: boolean;
bufferLineConstructor?: string;
}
export interface IBuffer {
+11
View File
@@ -99,6 +99,17 @@ declare module 'xterm' {
*/
experimentalCharAtlas?: 'none' | 'static' | 'dynamic';
/**
* (EXPERIMENTAL) Defines which implementation to use for buffer lines.
*
* - 'JsArray': The default/stable implementation.
* - 'TypedArray': The new experimental implementation based on TypedArrays that is expected to
* significantly boost performance and memory consumption. Use at your own risk.
*
* This option will be removed in the future.
*/
experimentalBufferLineImpl?: 'JsArray' | 'TypedArray';
/**
* The font size used to render text.
*/