Double buffering, animation frames, and layers