[Mesa-dev] [PATCH 3/4] egl_dri2: set correct error code if swapbuffers fails

Ian Romanick idr at freedesktop.org
Mon Feb 22 20:01:59 UTC 2016


On 02/11/2016 04:03 AM, Tapani Pälli wrote:
> From: Daniel Czarnowski <daniel.czarnowski at intel.com>
> 
> Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
> Cc: "11.0 11.1" <mesa-stable at lists.freedesktop.org
> ---
>  src/egl/drivers/dri2/platform_x11.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
> index 931ee51..7a26c38 100644
> --- a/src/egl/drivers/dri2/platform_x11.c
> +++ b/src/egl/drivers/dri2/platform_x11.c
> @@ -872,7 +872,11 @@ dri2_x11_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
>     struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
>  
>     if (dri2_dpy->dri2) {
> -      return dri2_x11_swap_buffers_msc(drv, disp, draw, 0, 0, 0) != -1;
> +      if (dri2_x11_swap_buffers_msc(drv, disp, draw, 0, 0, 0) != -1)
> +          return EGL_TRUE;

Blank line here.

With the comment (below) fixed, the braces added, and the blank line
added, this patch is

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

> +      /* Swap failed with a window drawable. */
> +      _eglError(EGL_BAD_NATIVE_WINDOW, __FUNCTION__);
> +      return EGL_FALSE;
>     } else {
>        assert(dri2_dpy->swrast);
>  
> 



More information about the mesa-dev mailing list