Wouldn't it be a better choice to use requestAnimationFrame() instead of setInterval() for drawing onto a canvas?