Hello. I am using p5.js and notice chrome notification about “Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true”. How can I pass in p5js canvas a context option willReadFrequently: true?
p5 doesn’t easily have a way to set this, but also setting this option means that hardware acceleration for other rendering operations will be disabled. While it might speed up loadPixels()/updatePixels(), it will probably also slow down any other p5 drawing functions, so p5 hasn’t given a way to set it as it will likely still slow down the sketch overall. The warning can be safely ignored.
1 Like