Refactor ZOOM record render code and fix #2892.