[Mesa-stable] [PATCH 2/6] egl: make eglSwapBuffers* a no-op for !window surfaces

Juan A. Suarez Romero jasuarez at igalia.com
Mon Oct 1 08:45:28 UTC 2018


On Mon, 2018-09-03 at 13:05 +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
> 
> Analogous to the previous commit - the spec says the function is a
> no-op when a pbuffer or pixmap surface is used.
> 

This series seems to be reviewed, but not pushed yet in master.

	J.A.

> Cc: samiuddi <sami.uddin.mohammad at intel.com>
> Cc: Eric Engestrom <eric.engestrom at intel.com>
> Cc: Erik Faye-Lund <kusmabite at gmail.com>
> Cc: Tomasz Figa <tfiga at chromium.org>
> Cc: <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
>  src/egl/main/eglapi.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
> index 0af31a3f774..0227197284f 100644
> --- a/src/egl/main/eglapi.c
> +++ b/src/egl/main/eglapi.c
> @@ -1260,6 +1260,9 @@ eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
>        RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
>     #endif
>  
> +   if (surf->Type != EGL_WINDOW_BIT)
> +      RETURN_EGL_EVAL(disp, EGL_TRUE);
> +
>     /* From the EGL 1.5 spec:
>      *
>      *    If eglSwapBuffers is called and the native window associated with
> @@ -1299,6 +1302,9 @@ _eglSwapBuffersWithDamageCommon(_EGLDisplay *disp, _EGLSurface *surf,
>         surf != ctx->DrawSurface)
>        RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
>  
> +   if (surf->Type != EGL_WINDOW_BIT)
> +      RETURN_EGL_EVAL(disp, EGL_TRUE);
> +
>     if ((n_rects > 0 && rects == NULL) || n_rects < 0)
>        RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
>  



More information about the mesa-stable mailing list