diff options
author | Chad Versace <[email protected]> | 2014-01-28 16:21:21 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2014-03-17 15:36:03 -0700 |
commit | ad173bcfdbeaa52d6a024cd7ef6c068c5a999ba2 (patch) | |
tree | 6a3e6f3fcdff841c5171764840e6323a48fc7056 /src/egl/drivers/dri2/egl_dri2.c | |
parent | 8b9298af0a3bce1360cc2c020b31470b37b660fe (diff) |
egl/dri2: Dispatch eglSwapBuffers by display, not driver
Add dri2_egl_display_vtbl::swap_buffers, set it for each platform, and
let egl_dri2 dispatch eglSwapBuffers to that.
This prepares for the EGL platform extensions.
Reviewed-by: Ian Romanick <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.c')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index e1a8e1e4490..0b56c12d50c 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -1022,6 +1022,13 @@ dri2_swap_interval(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, } static EGLBoolean +dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf) +{ + struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy); + return dri2_dpy->vtbl->swap_buffers(drv, dpy, surf); +} + +static EGLBoolean dri2_wait_client(_EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx) { struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); @@ -2045,6 +2052,7 @@ _eglBuiltInDriverDRI2(const char *args) dri2_drv->base.API.BindTexImage = dri2_bind_tex_image; dri2_drv->base.API.ReleaseTexImage = dri2_release_tex_image; dri2_drv->base.API.SwapInterval = dri2_swap_interval; + dri2_drv->base.API.SwapBuffers = dri2_swap_buffers; dri2_drv->base.API.CreateImageKHR = dri2_create_image_khr; dri2_drv->base.API.DestroyImageKHR = dri2_destroy_image_khr; #ifdef HAVE_DRM_PLATFORM |