diff --git a/src/display/canvas.js b/src/display/canvas.js index f77fe8a49..47d2a296f 100644 --- a/src/display/canvas.js +++ b/src/display/canvas.js @@ -320,11 +320,6 @@ class CanvasExtraState { } function putBinaryImageData(ctx, imgData) { - if (imgData instanceof ImageData) { - ctx.putImageData(imgData, 0, 0); - return; - } - // Put the image data to the canvas in chunks, rather than putting the // whole image at once. This saves JS memory, because the ImageData object // is smaller. It also possibly saves C++ memory within the implementation diff --git a/src/display/node_utils.js b/src/display/node_utils.js index 156832c9f..470f2c480 100644 --- a/src/display/node_utils.js +++ b/src/display/node_utils.js @@ -51,13 +51,6 @@ if (isNodeJS) { warn("Cannot polyfill `DOMMatrix`, rendering may be broken."); } } - if (!globalThis.ImageData) { - if (canvas?.ImageData) { - globalThis.ImageData = canvas.ImageData; - } else { - warn("Cannot polyfill `ImageData`, rendering may be broken."); - } - } if (!globalThis.Path2D) { if (canvas?.Path2D) { globalThis.Path2D = canvas.Path2D;