summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJørgen Lind <[email protected]>2011-09-15 17:36:46 +0200
committerKristian Høgsberg <[email protected]>2011-09-15 11:53:39 -0400
commit0763b978eea5f133e43fb223d50c08fcca5397a2 (patch)
treea0462e4b38ee1ed98ac4387578159c13ea0ef4bc
parent6fd6efa7bf90b0c85f69f2e989a273f82f381e3b (diff)
wayland: Flush before blocking in swapbuffers.
Make sure that we've sent the frame request that we're going to block on.
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index ff641ee2b27..7a70d8d5905 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -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);