depends on how You work with him.
1) if what is drawn is unknown, the tag is the method .toDataURL() — to bas64, i.e. you can save what is now drawn in png24 and then return back (can be on the timer with the transparency of this image to overlay);
2) you can impose on each other a few canvas tags if background: transparent dynamics can be displayed on it;
3) if there is any sequence of commands to "paint", then just clear the canvas and her vosproizvesti.
and, judging by the "two squares 40 pixels", for You a third option: memorize what and where it is necessary to withdraw and no problems at all.