From bd51bbfd1609e1f08034b16b813161d8468e0832 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 11 Sep 2021 10:26:41 +0200 Subject: [PATCH] Remove `mozImageSmoothingEnabled` fallback in `CanvasGraphics.endGroup` This was added all the way back in PR 2936, however it's been unnecessary ever since Firefox 51 (released on 2017-01-24); please see the MDN compatibility data: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/imageSmoothingEnabled#browser_compatibility --- src/display/canvas.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/display/canvas.js b/src/display/canvas.js index a165647c3..48fb2e449 100644 --- a/src/display/canvas.js +++ b/src/display/canvas.js @@ -2458,11 +2458,8 @@ class CanvasGraphics { this.ctx = this.groupStack.pop(); // Turn off image smoothing to avoid sub pixel interpolation which can // look kind of blurry for some pdfs. - if (this.ctx.imageSmoothingEnabled !== undefined) { - this.ctx.imageSmoothingEnabled = false; - } else { - this.ctx.mozImageSmoothingEnabled = false; - } + this.ctx.imageSmoothingEnabled = false; + if (group.smask) { this.tempSMask = this.smaskStack.pop(); } else {