egl/drm: remove eglSwap* surface check
Already handled further up in eglapi.c Cc: samiuddi <sami.uddin.mohammad@intel.com> Cc: Erik Faye-Lund <kusmabite@gmail.com> Cc: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
parent
91ccb59ff4
commit
a370e278d3
|
@ -434,22 +434,20 @@ dri2_drm_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
|
||||||
return EGL_TRUE;
|
return EGL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dri2_surf->base.Type == EGL_WINDOW_BIT) {
|
if (dri2_surf->current)
|
||||||
if (dri2_surf->current)
|
_eglError(EGL_BAD_SURFACE, "dri2_swap_buffers");
|
||||||
_eglError(EGL_BAD_SURFACE, "dri2_swap_buffers");
|
for (unsigned i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++)
|
||||||
for (unsigned i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++)
|
if (dri2_surf->color_buffers[i].age > 0)
|
||||||
if (dri2_surf->color_buffers[i].age > 0)
|
dri2_surf->color_buffers[i].age++;
|
||||||
dri2_surf->color_buffers[i].age++;
|
|
||||||
|
|
||||||
/* Make sure we have a back buffer in case we're swapping without
|
/* Make sure we have a back buffer in case we're swapping without
|
||||||
* ever rendering. */
|
* ever rendering. */
|
||||||
if (get_back_bo(dri2_surf) < 0)
|
if (get_back_bo(dri2_surf) < 0)
|
||||||
return _eglError(EGL_BAD_ALLOC, "dri2_swap_buffers");
|
return _eglError(EGL_BAD_ALLOC, "dri2_swap_buffers");
|
||||||
|
|
||||||
dri2_surf->current = dri2_surf->back;
|
dri2_surf->current = dri2_surf->back;
|
||||||
dri2_surf->current->age = 1;
|
dri2_surf->current->age = 1;
|
||||||
dri2_surf->back = NULL;
|
dri2_surf->back = NULL;
|
||||||
}
|
|
||||||
|
|
||||||
dri2_flush_drawable_for_swapbuffers(disp, draw);
|
dri2_flush_drawable_for_swapbuffers(disp, draw);
|
||||||
dri2_dpy->flush->invalidate(dri2_surf->dri_drawable);
|
dri2_dpy->flush->invalidate(dri2_surf->dri_drawable);
|
||||||
|
|
Loading…
Reference in New Issue