Do we need to do double buffering with <canvas>?

I'm starting to use Canvas (with GWT), do we need to implement double buffering? The wonder is if somehow browsers instead implement this for us already.

thank

+11
html5 canvas gwt
Aug 02 '12 at 12:30
source share
2 answers

You absolutely do not need to do double buffering yourself, and it will be a waste of time and performance.

Fortunately for us, every canvas implementation implements it off-screen for you.

Here is a simple example of this in action: http://jsfiddle.net/HYVLj/

+13
Aug 02 2018-12-12T00:
source share

I know this is a pretty old thread, but I would like to point out that the answer “Violin in Simon Sarris” seems wrong. When I tried this on Google Chrome, I inserted a notification instruction between lines 10 and 11 (just before the loop), and the square disappeared to reappear after closing the warning window. The loop seems to be executed incorrectly. Maybe javascript has optimized it. In any case, it seems to me that double buffering is not done. Correct me if I am wrong.

+4
Oct 27 '14 at 13:21
source share



All Articles