Only upload textures that change

This commit is contained in:
Daniel Imms
2022-10-29 13:27:33 -07:00
parent 0a49a5dde1
commit c257a7247e
4 changed files with 21 additions and 19 deletions
@@ -368,9 +368,9 @@ export abstract class BaseRenderLayer extends Disposable implements IRenderLayer
this._ctx.save();
this._clipRow(y);
// Draw the image, use the bitmap if it's available
if (this._charAtlas.hasCanvasChanged) {
if (this._charAtlas.pages[0].hasCanvasChanged) {
this._bitmapGenerator?.refresh();
this._charAtlas.hasCanvasChanged = false;
this._charAtlas.pages[0].hasCanvasChanged = false;
}
this._ctx.drawImage(
this._bitmapGenerator?.bitmap || this._charAtlas!.pages[0].canvas,