[whatwg] Any chance for Double Buffering in the <canvas>?
robert at ocallahan.org
Sat Sep 5 03:54:57 PDT 2009
On Sat, Sep 5, 2009 at 6:39 PM, Marius Gundersen <gundersen at gmail.com>wrote:
> I've been playing around with the canvas element, making a 3D engine. It
> works, but is incredibly slow. Part of the reason is probably that the
> browser renders the canvas everytime I draw something to it. In a 3D engine,
> as well as a game engine, the entire canvas is erased and redrawn several
> times a second, and only at the end of each frame does it need to be
> rendered to the screen.
I assume you have a setTimeout handler (or similar) which renders a complete
frame before returning. If so, then in Gecko and I think also in Webkit the
canvas will not be drawn to the screen while your script is running, only
between frames. So I suspect your performance problem has some other cause.
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg