Store extended attributes in single number

This commit is contained in:
Daniel Imms
2022-07-23 11:12:17 -07:00
parent 8cd01dc421
commit 03f15a7fb7
5 changed files with 28 additions and 15 deletions
@@ -384,8 +384,7 @@ export class WebglRenderer extends Disposable implements IRenderer {
private _loadColorsForCell(x: number, y: number): void {
this._workColors.bg = this._workCell.bg;
this._workColors.fg = this._workCell.fg;
// TODO: Use extended packed format as key
this._workColors.ext = this._workCell.extended.underlineStyle;
this._workColors.ext = this._workCell.extended.ext;
// Get any foreground/background overrides, this happens on the model to avoid spreading
// override logic throughout the different sub-renderers
@@ -333,8 +333,7 @@ export class WebglCharAtlas implements IDisposable {
this._workAttributeData.fg = fg;
this._workAttributeData.bg = bg;
// TODO: Use packed ext format
this._workAttributeData.extended.underlineStyle = ext;
this._workAttributeData.extended.ext = ext;
const invisible = !!this._workAttributeData.isInvisible();
if (invisible) {
@@ -423,6 +422,7 @@ export class WebglCharAtlas implements IDisposable {
this._tmpCtx.strokeStyle = this._tmpCtx.fillStyle;
this._tmpCtx.beginPath();
if (underline) {
console.log('ext', ext, this._workAttributeData.extended.underlineColor, this._workAttributeData.extended.underlineStyle);
const xLeft = padding;
const xRight = padding + this._config.scaledCharWidth;
const yMid = padding + this._config.scaledCharHeight - yOffset;