Reputation: 14411
While investigating some performance issues I stumbled upon the following performance comparison:
http://jsperf.com/fastest-canvas-drawing/2
which yields the following result:
This seems to suggest that if you use anything but a createObjectURL
image drawImage will be more than 90% slower. Is this really the case? Why?
Upvotes: 1
Views: 201
Reputation: 33789
Did you run this test in Chrome, Safari or another WebKit?
window.URL
is undefined in Chrome, you'd need to use window.webkitURL
instead (although not anymore in Chrome 23, but the use of mozGetAsFile
kills you anyway). You're seeing such faster results because the tests are just erroring out under Chrome for that option.
On Firefox, the results are much more in line with one another, as you might expect.
Upvotes: 1