From 63c2afdb3cda819e74aa6c233ccbe9f8922d02af Mon Sep 17 00:00:00 2001 From: Sam Wray Date: Thu, 19 Oct 2023 14:14:07 +0100 Subject: [PATCH] fix: adds willReadFrequently option to improve getImageData performance (#902) --- src/application/plugins/grab-canvas.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/application/plugins/grab-canvas.js b/src/application/plugins/grab-canvas.js index a4b9e93c9..f1e7d485f 100644 --- a/src/application/plugins/grab-canvas.js +++ b/src/application/plugins/grab-canvas.js @@ -13,7 +13,8 @@ const mappingContext = mappingCanvas.getContext("2d", { // (lights don't have an alpha channel, so let's drop it) alpha: false, desynchronized: true, - imageSmoothingEnabled: false + imageSmoothingEnabled: false, + willReadFrequently: true }); export default {