egl/kopper: Use the kopper private interface for swapBuffers.

I'm going to be introducing an extra flag to indicate EGL vs GLX behavior
in the private interface.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21317>
This commit is contained in:
Emma Anholt
2023-02-14 10:27:31 -08:00
committed by Marge Bot
parent 3e1b40be54
commit 53780b7a3a

View File

@@ -952,7 +952,11 @@ dri2_x11_swap_buffers(_EGLDisplay *disp, _EGLSurface *draw)
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
if (!dri2_dpy->flush) {
if (dri2_dpy->kopper) {
dri2_dpy->kopper->swapBuffers(dri2_surf->dri_drawable);
return EGL_TRUE;
} else if (!dri2_dpy->flush) {
/* aka the swrast path, which does the swap in the gallium driver. */
dri2_dpy->core->swapBuffers(dri2_surf->dri_drawable);
return EGL_TRUE;
}