diff options
author | Emil Velikov <[email protected]> | 2018-09-03 13:05:25 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2018-10-03 13:38:06 +0100 |
commit | a370e278d3bba4b0304d4a1e6de1e9a4f9c26266 (patch) | |
tree | fa48c805c7ec2cf28909b616a889ee95e82e4038 /src/egl | |
parent | 91ccb59ff48126ce7e9893a781646b22057f023a (diff) |
egl/drm: remove eglSwap* surface check
Already handled further up in eglapi.c
Cc: samiuddi <[email protected]>
Cc: Erik Faye-Lund <[email protected]>
Cc: Tomasz Figa <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/egl')
-rw-r--r-- | src/egl/drivers/dri2/platform_drm.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index 7538b3c7a45..da56064cbde 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -434,22 +434,20 @@ dri2_drm_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw) return EGL_TRUE; } - if (dri2_surf->base.Type == EGL_WINDOW_BIT) { - if (dri2_surf->current) - _eglError(EGL_BAD_SURFACE, "dri2_swap_buffers"); - for (unsigned i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) - if (dri2_surf->color_buffers[i].age > 0) - dri2_surf->color_buffers[i].age++; - - /* Make sure we have a back buffer in case we're swapping without - * ever rendering. */ - if (get_back_bo(dri2_surf) < 0) - return _eglError(EGL_BAD_ALLOC, "dri2_swap_buffers"); - - dri2_surf->current = dri2_surf->back; - dri2_surf->current->age = 1; - dri2_surf->back = NULL; - } + if (dri2_surf->current) + _eglError(EGL_BAD_SURFACE, "dri2_swap_buffers"); + for (unsigned i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) + if (dri2_surf->color_buffers[i].age > 0) + dri2_surf->color_buffers[i].age++; + + /* Make sure we have a back buffer in case we're swapping without + * ever rendering. */ + if (get_back_bo(dri2_surf) < 0) + return _eglError(EGL_BAD_ALLOC, "dri2_swap_buffers"); + + dri2_surf->current = dri2_surf->back; + dri2_surf->current->age = 1; + dri2_surf->back = NULL; dri2_flush_drawable_for_swapbuffers(disp, draw); dri2_dpy->flush->invalidate(dri2_surf->dri_drawable); |