I noticed that the drawImage function is 1000+ times slower when both source and destination canvases are the same. Why is this ? What canvases go to the GPU and what don't ? Any help on this topic would be very much appreciated.
Thanks !
I noticed that the drawImage function is 1000+ times slower when both source and destination canvases are the same. Why is this ? What canvases go to the GPU and what don't ? Any help on this topic would be very much appreciated.
Thanks !
When you use the canvas as both source and destination, the browser is required to do (there are finer steps involved, but these are the main ones):
This instead of when you use separate canvases:
Why not just "blitting"? The official standard define this case in this way (my emphasis):
Also take a look at the Drawing Model for the steps involved.