@xterm/addon-webgl 0.19.0-beta.82 → 0.19.0-beta.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xterm/addon-webgl",
|
|
3
|
-
"version": "0.19.0-beta.
|
|
3
|
+
"version": "0.19.0-beta.84",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "The xterm.js authors",
|
|
6
6
|
"url": "https://xtermjs.org/"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"start": "node ../../demo/start"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@xterm/xterm": "^5.6.0-beta.
|
|
27
|
+
"@xterm/xterm": "^5.6.0-beta.84"
|
|
28
28
|
},
|
|
29
|
-
"commit": "
|
|
29
|
+
"commit": "9e206415b891058a3db772fd070ea299325dc647"
|
|
30
30
|
}
|
package/src/WebglRenderer.ts
CHANGED
|
@@ -33,6 +33,7 @@ export class WebglRenderer extends Disposable implements IRenderer {
|
|
|
33
33
|
private _charAtlasDisposable = this._register(new MutableDisposable());
|
|
34
34
|
private _charAtlas: ITextureAtlas | undefined;
|
|
35
35
|
private _devicePixelRatio: number;
|
|
36
|
+
private _deviceMaxTextureSize: number;
|
|
36
37
|
private _observerDisposable = this._register(new MutableDisposable());
|
|
37
38
|
|
|
38
39
|
private _model: RenderModel = new RenderModel();
|
|
@@ -102,6 +103,8 @@ export class WebglRenderer extends Disposable implements IRenderer {
|
|
|
102
103
|
throw new Error('WebGL2 not supported ' + this._gl);
|
|
103
104
|
}
|
|
104
105
|
|
|
106
|
+
this._deviceMaxTextureSize = this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE);
|
|
107
|
+
|
|
105
108
|
this._register(addDisposableListener(this._canvas, 'webglcontextlost', (e) => {
|
|
106
109
|
console.log('webglcontextlost event received');
|
|
107
110
|
// Prevent the default behavior in order to enable WebGL context restoration.
|
|
@@ -272,7 +275,8 @@ export class WebglRenderer extends Disposable implements IRenderer {
|
|
|
272
275
|
this.dimensions.device.cell.height,
|
|
273
276
|
this.dimensions.device.char.width,
|
|
274
277
|
this.dimensions.device.char.height,
|
|
275
|
-
this._coreBrowserService.dpr
|
|
278
|
+
this._coreBrowserService.dpr,
|
|
279
|
+
this._deviceMaxTextureSize
|
|
276
280
|
);
|
|
277
281
|
if (this._charAtlas !== atlas) {
|
|
278
282
|
this._onChangeTextureAtlas.fire(atlas.pages[0].canvas);
|
|
@@ -94,7 +94,8 @@ export abstract class BaseRenderLayer extends Disposable implements IRenderLayer
|
|
|
94
94
|
if (this._deviceCharWidth <= 0 && this._deviceCharHeight <= 0) {
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
|
-
|
|
97
|
+
|
|
98
|
+
this._charAtlas = acquireTextureAtlas(terminal, this._optionsService.rawOptions, colorSet, this._deviceCellWidth, this._deviceCellHeight, this._deviceCharWidth, this._deviceCharHeight, this._coreBrowserService.dpr, 2048);
|
|
98
99
|
this._charAtlas.warmUp();
|
|
99
100
|
}
|
|
100
101
|
|