mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 13:30:11 +01:00
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:
parent
64b4ccde0c
commit
8f66743ca2
1 changed files with 6 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue