From 46556eb6cf953ff61ef5d4b02a2c192cdd5ee782 Mon Sep 17 00:00:00 2001 From: Anthony Kim Date: Thu, 9 Jul 2026 11:32:23 -0700 Subject: [PATCH] Rename to pageLayoutVersion --- addons/addon-webgl/src/GlyphRenderer.ts | 8 ++++---- addons/addon-webgl/src/TextureAtlas.ts | 12 ++++++------ addons/addon-webgl/src/Types.ts | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/addons/addon-webgl/src/GlyphRenderer.ts b/addons/addon-webgl/src/GlyphRenderer.ts index 3c77c7cf5..dcba0b4b8 100644 --- a/addons/addon-webgl/src/GlyphRenderer.ts +++ b/addons/addon-webgl/src/GlyphRenderer.ts @@ -100,7 +100,7 @@ export class GlyphRenderer extends Disposable { private readonly _attributesBuffer: WebGLBuffer; private _atlas: ITextureAtlas | undefined; - private _lastSeenPagesVersion: number = -1; + private _lastSeenPageLayoutVersion: number = -1; private _activeBuffer: number = 0; private readonly _vertices: IVertices = { count: 0, @@ -218,8 +218,8 @@ export class GlyphRenderer extends Disposable { if (!this._atlas) { return true; } - if (this._atlas.pagesVersion !== this._lastSeenPagesVersion) { - this._lastSeenPagesVersion = this._atlas.pagesVersion; + if (this._atlas.pageLayoutVersion !== this._lastSeenPageLayoutVersion) { + this._lastSeenPageLayoutVersion = this._atlas.pageLayoutVersion; return true; } return false; @@ -383,7 +383,7 @@ export class GlyphRenderer extends Disposable { public setAtlas(atlas: ITextureAtlas): void { this._atlas = atlas; - this._lastSeenPagesVersion = -1; + this._lastSeenPageLayoutVersion = -1; this.invalidateAtlasTextures(); } diff --git a/addons/addon-webgl/src/TextureAtlas.ts b/addons/addon-webgl/src/TextureAtlas.ts index 73056b87e..5368c9b46 100644 --- a/addons/addon-webgl/src/TextureAtlas.ts +++ b/addons/addon-webgl/src/TextureAtlas.ts @@ -132,8 +132,8 @@ export class TextureAtlas implements ITextureAtlas { } } - private _pagesVersion = 0; - public get pagesVersion(): number { return this._pagesVersion; } + private _pageLayoutVersion = 0; + public get pageLayoutVersion(): number { return this._pageLayoutVersion; } public clearTexture(): void { if (this._pages[0].currentRow.x === 0 && this._pages[0].currentRow.y === 0) { @@ -202,8 +202,8 @@ export class TextureAtlas implements ITextureAtlas { // Add the new merged page to the end this.pages.push(mergedPage); - // Invalidate renderer models so all texture pages are refreshed. - this._pagesVersion++; + // Request the model to be cleared to refresh all texture pages. + this._pageLayoutVersion++; this._onAddTextureAtlasCanvas.fire(mergedPage.canvas); } @@ -814,8 +814,8 @@ export class TextureAtlas implements ITextureAtlas { this._overflowSizePage = new AtlasPage(this._document, this._config.deviceMaxTextureSize); this.pages.push(this._overflowSizePage); - // Invalidate renderer models so all texture pages are refreshed. - this._pagesVersion++; + // Request the model to be cleared to refresh all texture pages. + this._pageLayoutVersion++; this._onAddTextureAtlasCanvas.fire(this._overflowSizePage.canvas); } activePage = this._overflowSizePage; diff --git a/addons/addon-webgl/src/Types.ts b/addons/addon-webgl/src/Types.ts index 1c9a7f931..0a46a0071 100644 --- a/addons/addon-webgl/src/Types.ts +++ b/addons/addon-webgl/src/Types.ts @@ -68,11 +68,11 @@ export interface ITextureAtlas extends IDisposable { warmUp(): void; /** - * 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 + * Incremented whenever atlas page indexes or coordinates cached by renderers may be stale. + * Each renderer tracks its own last-seen value so shared atlas layout changes are observed * independently by every terminal. */ - readonly pagesVersion: number; + readonly pageLayoutVersion: number; /** * Clear all glyphs from the texture atlas.