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 <sami.uddin.mohammad@intel.com> Cc: Erik Faye-Lund <kusmabite@gmail.com> Cc: Tomasz Figa <tfiga@chromium.org> Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
committed by
Emil Velikov
parent
64b4ccde0c
commit
8f66743ca2
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user