Double-buffering hides the image being drawn until it is finished.
The previously completed image is displayed while the new one is drawn.
Useful for smooth animation.
To use double-buffering: