Why does drawImage performance differ greatly with larger than 65776 pixel canvas sources

人走茶凉 提交于 2019-12-12 11:02:41

问题


I wrote some test cases on jsperf related to: 1. drawing on an offscreen canvas 2. drawImage to an onscreen canvas

I found that performance was much higher if the number of pixels in the source canvas (regardless of dst) was less than ~ 65776 pixels.

(I expected this performance limit to be 65536 pixels, if it was going to be anything)

Here are my test cases:

http://jsperf.com/pixel-count-matters/2

http://jsperf.com/magic-canvas/2

I believe this person is asking a similar question: Why does FPS go down if canvas is larger than 255x220?

Thanks for your help!!!

来源:https://stackoverflow.com/questions/19038058/why-does-drawimage-performance-differ-greatly-with-larger-than-65776-pixel-canva

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!