mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
egl/x11: move teardown code to the platform file
Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:
parent
55245fe1c9
commit
938fcab08b
3 changed files with 11 additions and 5 deletions
|
|
@ -988,13 +988,9 @@ dri2_display_destroy(_EGLDisplay *disp)
|
|||
#endif
|
||||
|
||||
switch (disp->Platform) {
|
||||
#ifdef HAVE_X11_PLATFORM
|
||||
case _EGL_PLATFORM_X11:
|
||||
if (dri2_dpy->own_device) {
|
||||
xcb_disconnect(dri2_dpy->conn);
|
||||
}
|
||||
dri2_teardown_x11(dri2_dpy);
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
case _EGL_PLATFORM_DRM:
|
||||
if (dri2_dpy->own_device) {
|
||||
|
|
|
|||
|
|
@ -403,12 +403,16 @@ dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
|
|||
#ifdef HAVE_X11_PLATFORM
|
||||
EGLBoolean
|
||||
dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp);
|
||||
void
|
||||
dri2_teardown_x11(struct dri2_egl_display *dri2_dpy);
|
||||
#else
|
||||
static inline EGLBoolean
|
||||
dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
{
|
||||
return _eglError(EGL_NOT_INITIALIZED, "X11 platform not built");
|
||||
}
|
||||
static inline void
|
||||
dri2_teardown_x11(struct dri2_egl_display *dri2_dpy) {}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DRM_PLATFORM
|
||||
|
|
|
|||
|
|
@ -1476,3 +1476,9 @@ dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp)
|
|||
return initialized;
|
||||
}
|
||||
|
||||
void
|
||||
dri2_teardown_x11(struct dri2_egl_display *dri2_dpy)
|
||||
{
|
||||
if (dri2_dpy->own_device)
|
||||
xcb_disconnect(dri2_dpy->conn);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue