Remap buffers switching so it works faster.