My app makes heavy use of HTML5 Canvas2D. After profiling I've found that highest number of function calls are HTML5 Canvas's .stroke() and .fill() functions. Therefore to further improve the performance of my app I have to optimize drawing on Canvas. I am considering Chrome's NaCl plugin. I found that it has a native interface pp::Graphics2D to draw 2D graphics. Does anyone know if the NaCl 2D graphics interface is faster than HTML5 Canvas 2D?
3
votes
Have you looked into WebGL? This will give you a hardware accelerated surface but with more browser support than Chrome-only NaCl. I'm also suprised stroke and fill aren't accelerated. Are you sure you aren't confusing number of calls with actual time spent in those calls?
– SpliFF
Ok, I should have mentioned this before. I am already using WebGL if it is available, but I am looking for a solution for people who don't have WebGL or don't have graphics card.
– Jayesh