I am trying to optimize some code that uses the canvas.drawImage() call. This is a pretty expensive call when called several hundreds or thousands of times. Found out about the canvas.toBlob(callback) method but I want to know if there is a way to get only a section of the canvas.
drawimage() gives much more fine grain control over which sections should be draw.
canvas.drawImage(canvas, sx, sy, sw, sh, dx, dy, dw, dh);
Any suggestions / thoughts are welcomed!