[PATCH] egl/wayland: flush connection data in eglSwapBuffers
Robert Bragg
robert at linux.intel.com
Tue May 10 13:36:33 PDT 2011
This ensures we call wl_display_flush () as part of handling
eglSwapBuffers. The spec for SwapBuffers only explicitly requires
flushing commands for the current rendering API (e.g. glFlush() for GL
or vgFlush() for OpenVG) but it also seems appropriate to flush the swap
request itself too and arguably it feels more consistent with how other
EGL platform bindings behave besides slightly simplifying porting
existing EGL apps to wayland.
---
src/egl/drivers/dri2/platform_wayland.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 1b75ffe..35c91ae 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -504,11 +504,11 @@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
dri2_surf->base.Width, dri2_surf->base.Height);
}
- _EGLContext *ctx;
- if (dri2_drv->glFlush) {
- ctx = _eglGetCurrentContext();
- if (ctx && ctx->DrawSurface == &dri2_surf->base)
+ _EGLContext *ctx = _eglGetCurrentContext();
+ if (ctx && ctx->DrawSurface == &dri2_surf->base) {
+ if (dri2_drv->glFlush)
dri2_drv->glFlush();
+ wl_display_flush (dri2_dpy->wl_dpy->display);
}
(*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
--
1.7.0.4
More information about the wayland-devel
mailing list