From d6a6760139c5301544636cd23e014db11559d25a Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Mon, 3 Sep 2018 13:05:27 +0100 Subject: [PATCH] egl/x11: remove eglSwap* surface check Already handled further up in eglapi.c. To make things a tiny bit strange, X11+DRI3 was doing the wrong thing by returning EGL_FALSE (+ no error), while X11+DRI2 was returning EGL_TRUE. Cc: samiuddi Cc: Eric Engestrom Cc: Erik Faye-Lund Cc: Tomasz Figa Signed-off-by: Emil Velikov --- src/egl/drivers/dri2/platform_x11.c | 4 ---- src/egl/drivers/dri2/platform_x11_dri3.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c index c525b583411..88040bda6e6 100644 --- a/src/egl/drivers/dri2/platform_x11.c +++ b/src/egl/drivers/dri2/platform_x11.c @@ -898,10 +898,6 @@ dri2_x11_swap_buffers_msc(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw, xcb_dri2_swap_buffers_reply_t *reply; int64_t swap_count = -1; - /* No-op for a pixmap or pbuffer surface */ - if (draw->Type == EGL_PIXMAP_BIT || draw->Type == EGL_PBUFFER_BIT) - return 0; - if (draw->SwapBehavior == EGL_BUFFER_PRESERVED || !dri2_dpy->swap_available) { swap_count = dri2_copy_region(drv, disp, draw, dri2_surf->region) ? 0 : -1; } else { diff --git a/src/egl/drivers/dri2/platform_x11_dri3.c b/src/egl/drivers/dri2/platform_x11_dri3.c index e1967422f0a..1206cd39ae6 100644 --- a/src/egl/drivers/dri2/platform_x11_dri3.c +++ b/src/egl/drivers/dri2/platform_x11_dri3.c @@ -423,10 +423,6 @@ dri3_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw) { struct dri3_egl_surface *dri3_surf = dri3_egl_surface(draw); - /* No-op for a pixmap or pbuffer surface */ - if (draw->Type == EGL_PIXMAP_BIT || draw->Type == EGL_PBUFFER_BIT) - return EGL_FALSE; - return loader_dri3_swap_buffers_msc(&dri3_surf->loader_drawable, 0, 0, 0, 0, draw->SwapBehavior == EGL_BUFFER_PRESERVED) != -1; -- 2.30.2