mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 11:20:41 +01:00
egl: replace _egl_driver->Unload() callback with a simple free()
Bonus: fixes a memleak on haiku when unloading the driver Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
parent
6049fa454e
commit
9690759d0c
4 changed files with 1 additions and 28 deletions
|
|
@ -3178,14 +3178,6 @@ dri2_interop_export_object(_EGLDisplay *dpy, _EGLContext *ctx,
|
|||
return dri2_dpy->interop->export_object(dri2_ctx->dri_context, in, out);
|
||||
}
|
||||
|
||||
static void
|
||||
dri2_unload(_EGLDriver *drv)
|
||||
{
|
||||
struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv);
|
||||
|
||||
free(dri2_drv);
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
dri2_load(_EGLDriver *drv)
|
||||
{
|
||||
|
|
@ -3272,7 +3264,6 @@ _eglBuiltInDriver(void)
|
|||
dri2_drv->base.API.DupNativeFenceFDANDROID = dri2_dup_native_fence_fd;
|
||||
|
||||
dri2_drv->base.Name = "DRI2";
|
||||
dri2_drv->base.Unload = dri2_unload;
|
||||
|
||||
return &dri2_drv->base;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -308,14 +308,6 @@ haiku_swap_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf)
|
|||
}
|
||||
|
||||
|
||||
extern "C"
|
||||
void
|
||||
haiku_unload(_EGLDriver* drv)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is the main entrypoint into the driver, called by libEGL.
|
||||
* Create a new _EGLDriver object and init its dispatch table.
|
||||
|
|
@ -347,7 +339,6 @@ _eglBuiltInDriver(void)
|
|||
driver->base.API.SwapBuffers = haiku_swap_buffers;
|
||||
|
||||
driver->base.Name = "Haiku";
|
||||
driver->base.Unload = haiku_unload;
|
||||
|
||||
TRACE("API Calls defined\n");
|
||||
|
||||
|
|
|
|||
|
|
@ -120,8 +120,6 @@ void
|
|||
_eglUnloadDrivers(void)
|
||||
{
|
||||
/* this is called at atexit time */
|
||||
if (_eglDriver && _eglDriver->Unload)
|
||||
_eglDriver->Unload(_eglDriver);
|
||||
|
||||
free(_eglDriver);
|
||||
_eglDriver = NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,13 +80,6 @@ struct _egl_driver
|
|||
{
|
||||
const char *Name; /**< name of this driver */
|
||||
|
||||
/**
|
||||
* Release the driver resource.
|
||||
*
|
||||
* It is called before dlclose().
|
||||
*/
|
||||
void (*Unload)(_EGLDriver *drv);
|
||||
|
||||
_EGLAPI API; /**< EGL API dispatch table */
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue