if (draw->SwapBehavior == EGL_BUFFER_PRESERVED || !dri2_dpy->swap_available)
return dri2_copy_region(drv, disp, draw, dri2_surf->region) ? 0 : -1;
- if (dri2_dpy->flush)
- (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
+ dri2_flush_drawable_for_swapbuffers(disp, draw);
cookie = xcb_dri2_swap_buffers_unchecked(dri2_dpy->conn, dri2_surf->drawable,
msc_hi, msc_lo, divisor_hi, divisor_lo, remainder_hi, remainder_lo);