wayland: Flush before blocking in swapbuffers.

Make sure that we've sent the frame request that we're going to block on.
This commit is contained in:
Jørgen Lind
2011-09-15 17:36:46 +02:00
committed by Kristian Høgsberg
parent 6fd6efa7bf
commit 0763b978ee
+5 -2
View File
@@ -574,8 +574,11 @@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv);
struct wl_callback *callback;
while (dri2_surf->block_swap_buffers)
wl_display_iterate(dri2_dpy->wl_dpy, WL_DISPLAY_READABLE);
if (dri2_surf->block_swap_buffers) {
wl_display_flush(dri2_dpy->wl_dpy);
while (dri2_surf->block_swap_buffers)
wl_display_iterate(dri2_dpy->wl_dpy, WL_DISPLAY_READABLE);
}
dri2_surf->block_swap_buffers = EGL_TRUE;
callback = wl_surface_frame(dri2_surf->wl_win->surface);