tremendously improved performance, especially on Firefox. by calling getImageData() once in every frame.