Add batching to image drawing. This should prevent flicker in handle_frame.