[PATCH] Flush the wl_display at the end of SwapBuffers

Axel Davy axel.davy at ens.fr
Tue Dec 3 08:38:09 PST 2013


We would like the compositor to receive the commited buffer
as soon as possible, so it has the time to treat it, and 
release old ones. We shouldn't rely on the client
to flush the queue for us.

Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
We flush the wl_display after we flush the drawable.

 src/egl/drivers/dri2/platform_wayland.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 7e3733b..8c3d1f1 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -627,6 +627,8 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv,
       (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
    (*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
 
+   wl_display_flush(dri2_dpy->wl_dpy);
+
    return EGL_TRUE;
 }
 
-- 
1.8.1.2



More information about the wayland-devel mailing list