Add double buffering.