[Mesa-dev] [PATCH 3.5/7] egl/x11: flatten codeflow
Emil Velikov
emil.l.velikov at gmail.com
Mon May 22 17:38:18 UTC 2017
From: Emil Velikov <emil.velikov at collabora.com>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
src/egl/drivers/dri2/platform_x11.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 7ca2611b110..becf00547e6 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -891,19 +891,17 @@ dri2_x11_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
- if (dri2_dpy->flush) {
- if (dri2_x11_swap_buffers_msc(drv, disp, draw, 0, 0, 0) != -1) {
- return EGL_TRUE;
- }
+ if (!dri2_dpy->flush) {
+ dri2_dpy->core->swapBuffers(dri2_surf->dri_drawable);
+ return EGL_TRUE;
+ }
+
+ if (dri2_x11_swap_buffers_msc(drv, disp, draw, 0, 0, 0) == -1) {
/* Swap failed with a window drawable. */
_eglError(EGL_BAD_NATIVE_WINDOW, __func__);
return EGL_FALSE;
- } else {
- assert(dri2_dpy->swrast);
-
- dri2_dpy->core->swapBuffers(dri2_surf->dri_drawable);
- return EGL_TRUE;
}
+ return EGL_TRUE;
}
static EGLBoolean
--
2.12.2
More information about the mesa-dev
mailing list