Closed caiosm1005 closed 4 months ago
Recent versions of Google Chrome now issue a warning due to a missing willReadFrequently option when getting the Canvas2D context.
willReadFrequently
The warning message is as follows:
Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true. See: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently
This PR addresses this by adding the option willReadFrequently: true to both getContext() calls that preceed a getImageData() call.
willReadFrequently: true
getContext()
getImageData()
Recent versions of Google Chrome now issue a warning due to a missing
willReadFrequently
option when getting the Canvas2D context.The warning message is as follows:
This PR addresses this by adding the option
willReadFrequently: true
to bothgetContext()
calls that preceed agetImageData()
call.