diff --git a/core/display.js b/core/display.js index 5a6644d9..2e1eff83 100644 --- a/core/display.js +++ b/core/display.js @@ -461,6 +461,12 @@ export default class Display { this._target.style.width = width; this._target.style.height = height; } + + if (factor === 1 && this._target.style.imageRendering !== 'pixelated') { + this._target.style.imageRendering = 'pixelated'; + } else if (factor !== 1 && this._target.style.imageRendering !== 'auto') { + this._target.style.imageRendering = 'auto'; + } } _setFillColor(color) { diff --git a/core/rfb.js b/core/rfb.js index cf9cccaf..41b94f07 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -225,6 +225,7 @@ export default class RFB extends EventTargetMixin { this._canvas.style.margin = 'auto'; // Some browsers add an outline on focus this._canvas.style.outline = 'none'; + this._canvas.style.imageRendering = 'pixelated'; this._canvas.width = 0; this._canvas.height = 0; this._canvas.tabIndex = -1;