summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2016-08-18 16:33:39 +0100
committerEmil Velikov <[email protected]>2016-10-14 12:16:08 +0100
commit8cf83f9c08a929547062a8ba105a3a75531d72a4 (patch)
tree29ccbb9c730b60f026b26e36a169d7eb90146d02 /src/egl/drivers
parent532ec2edd878e5691998a1b2132a68a89845b55e (diff)
egl/dri2: call static functions directly, not via _EGLDriver::API
The indirection is meant to be used by the core EGL implementation in main. Not in the drivers themselves. Move the dri2_destroy_surface definition to avoid forward declaration of the static function. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/egl/drivers')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 5ad97b9c81b..cc10e604bbd 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1238,6 +1238,17 @@ dri2_destroy_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx)
return EGL_TRUE;
}
+static EGLBoolean
+dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf)
+{
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+
+ if (!_eglPutSurface(surf))
+ return EGL_TRUE;
+
+ return dri2_dpy->vtbl->destroy_surface(drv, dpy, surf);
+}
+
/**
* Called via eglMakeCurrent(), drv->API.MakeCurrent().
*/
@@ -1281,15 +1292,15 @@ dri2_make_current(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
if (unbind || dri2_dpy->core->bindContext(cctx, ddraw, rdraw)) {
if (old_dsurf)
- drv->API.DestroySurface(drv, disp, old_dsurf);
+ dri2_destroy_surface(drv, disp, old_dsurf);
if (old_rsurf)
- drv->API.DestroySurface(drv, disp, old_rsurf);
+ dri2_destroy_surface(drv, disp, old_rsurf);
if (!unbind)
dri2_dpy->ref_count++;
if (old_ctx) {
EGLDisplay old_disp = _eglGetDisplayHandle(old_ctx->Resource.Display);
- drv->API.DestroyContext(drv, disp, old_ctx);
+ dri2_destroy_context(drv, disp, old_ctx);
dri2_display_release(old_disp);
}
@@ -1365,17 +1376,6 @@ 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);
-
- if (!_eglPutSurface(surf))
- return EGL_TRUE;
-
- return dri2_dpy->vtbl->destroy_surface(drv, dpy, surf);
-}
-
-static EGLBoolean
dri2_swap_interval(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
EGLint interval)
{