diff options
author | Emil Velikov <[email protected]> | 2018-09-03 13:05:23 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2018-10-03 13:38:05 +0100 |
commit | 8f66743ca2cd781e912a3998196bf2ef1b9f8f4c (patch) | |
tree | dd1e6258162b9240dea649bef3e8142149cf3041 /src/egl/main/eglapi.c | |
parent | 64b4ccde0cab4bbabba8abbf206ec5aa53399821 (diff) |
egl: make eglSwapBuffers* a no-op for !window surfaces
Analogous to the previous commit - the spec says the function is a
no-op when a pbuffer or pixmap surface is used.
Cc: samiuddi <[email protected]>
Cc: Erik Faye-Lund <[email protected]>
Cc: Tomasz Figa <[email protected]>
Cc: <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/egl/main/eglapi.c')
-rw-r--r-- | src/egl/main/eglapi.c | 6 |
1 files changed, 6 insertions, 0 deletions
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); |