diff options
author | Chad Versace <[email protected]> | 2014-01-28 17:03:03 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2014-03-17 15:36:04 -0700 |
commit | 958dd80c40dc87545b49d09cb2e4415a30746004 (patch) | |
tree | 2cba4a1a76807498a543e00a4307bdd63c6d2f92 /src/egl/drivers/dri2/egl_dri2.c | |
parent | bf20076bafcf0809529ae470fb12af5eae12b33d (diff) |
egl/dri2: Dispatch eglDestroySurface by display, not driver
Add dri2_egl_display_vtbl::destroy_surface, set it for each
platform, and let egl_dri2 dispatch eglDestroySurface 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 18b1c713982..2158a17ba19 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -1042,6 +1042,13 @@ dri2_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *dpy, } static EGLBoolean +dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf) +{ + struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy); + return dri2_dpy->vtbl->destroy_surface(drv, dpy, surf); +} + +static EGLBoolean dri2_swap_interval(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint interval) { @@ -2087,6 +2094,7 @@ _eglBuiltInDriverDRI2(const char *args) dri2_drv->base.API.CreateWindowSurface = dri2_create_window_surface; dri2_drv->base.API.CreatePixmapSurface = dri2_create_pixmap_surface; dri2_drv->base.API.CreatePbufferSurface = dri2_create_pbuffer_surface; + dri2_drv->base.API.DestroySurface = dri2_destroy_surface; dri2_drv->base.API.GetProcAddress = dri2_get_proc_address; dri2_drv->base.API.WaitClient = dri2_wait_client; dri2_drv->base.API.WaitNative = dri2_wait_native; |