This commit is contained in:
Anthony Kim
2026-07-09 11:00:31 -07:00
parent 6fe6fe1af3
commit 77bf56066c
2 changed files with 7 additions and 5 deletions
+4 -4
View File
@@ -100,7 +100,7 @@ export class GlyphRenderer extends Disposable {
private readonly _attributesBuffer: WebGLBuffer; private readonly _attributesBuffer: WebGLBuffer;
private _atlas: ITextureAtlas | undefined; private _atlas: ITextureAtlas | undefined;
private _lastAtlasPagesVersion: number = -1; private _lastSeenPagesVersion: number = -1;
private _activeBuffer: number = 0; private _activeBuffer: number = 0;
private readonly _vertices: IVertices = { private readonly _vertices: IVertices = {
count: 0, count: 0,
@@ -218,8 +218,8 @@ export class GlyphRenderer extends Disposable {
if (!this._atlas) { if (!this._atlas) {
return true; return true;
} }
if (this._atlas.pagesVersion !== this._lastAtlasPagesVersion) { if (this._atlas.pagesVersion !== this._lastSeenPagesVersion) {
this._lastAtlasPagesVersion = this._atlas.pagesVersion; this._lastSeenPagesVersion = this._atlas.pagesVersion;
return true; return true;
} }
return false; return false;
@@ -383,7 +383,7 @@ export class GlyphRenderer extends Disposable {
public setAtlas(atlas: ITextureAtlas): void { public setAtlas(atlas: ITextureAtlas): void {
this._atlas = atlas; this._atlas = atlas;
this._lastAtlasPagesVersion = -1; this._lastSeenPagesVersion = -1;
this.invalidateAtlasTextures(); this.invalidateAtlasTextures();
} }
+3 -1
View File
@@ -68,7 +68,9 @@ export interface ITextureAtlas extends IDisposable {
warmUp(): void; warmUp(): void;
/** /**
* Incremented whenever texture page indexes or coordinates cached by renderers may be stale. * Incremented whenever cached glyph texture page indexes or coordinates may be stale.
* Each renderer tracks its own last-seen value so shared atlas changes are observed
* independently by every terminal.
*/ */
readonly pagesVersion: number; readonly pagesVersion: number;