Exemple #1
0
static void
drm_display_destroy(struct native_display *ndpy)
{
   struct drm_display *drmdpy = drm_display(ndpy);

   if (drmdpy->config)
      FREE(drmdpy->config);

   drm_display_fini_modeset(&drmdpy->base);

   /* gbm owns screen */
   ndpy->screen = NULL;
   ndpy_uninit(ndpy);

   if (drmdpy->device_name)
      FREE(drmdpy->device_name);

   if (drmdpy->own_gbm) {
      gbm_device_destroy(&drmdpy->gbmdrm->base.base);
      if (drmdpy->fd >= 0)
         close(drmdpy->fd);
   }

   FREE(drmdpy);
}
Exemple #2
0
static void
fbdev_display_destroy(struct native_display *ndpy)
{
   struct fbdev_display *fbdpy = fbdev_display(ndpy);

   ndpy_uninit(&fbdpy->base);
   close(fbdpy->fd);
   FREE(fbdpy);
}
Exemple #3
0
static void
null_display_destroy(struct native_display *ndpy)
{
   struct null_display *null = null_display(ndpy);

   FREE(null->configs);
   ndpy_uninit(&null->base);
   FREE(null);
}
Exemple #4
0
static void
gdi_display_destroy(struct native_display *ndpy)
{
   struct gdi_display *gdpy = gdi_display(ndpy);

   if (gdpy->configs)
      FREE(gdpy->configs);

   ndpy_uninit(ndpy);

   FREE(gdpy);
}
Exemple #5
0
static void
ximage_display_destroy(struct native_display *ndpy)
{
   struct ximage_display *xdpy = ximage_display(ndpy);

   if (xdpy->configs)
      FREE(xdpy->configs);

   ndpy_uninit(ndpy);

   x11_screen_destroy(xdpy->xscr);
   if (xdpy->own_dpy)
      XCloseDisplay(xdpy->dpy);
   FREE(xdpy);
}
Exemple #6
0
static void 
wayland_drm_display_destroy(struct native_display *ndpy)
{
   struct wayland_drm_display *drmdpy = wayland_drm_display(ndpy);

   if (drmdpy->fd)
      close(drmdpy->fd);
   if (drmdpy->wl_drm)
      wl_drm_destroy(drmdpy->wl_drm);
   if (drmdpy->device_name)
      FREE(drmdpy->device_name);
   if (drmdpy->base.configs)
      FREE(drmdpy->base.configs);
   if (drmdpy->base.own_dpy)
      wl_display_destroy(drmdpy->base.dpy);

   ndpy_uninit(ndpy);

   FREE(drmdpy);
}
Exemple #7
0
static boolean
null_display_init_screen(struct native_display *ndpy)
{
   struct null_display *null = null_display(ndpy);
   struct sw_winsys *ws;

   ws = null_sw_create();
   if (!ws)
      return FALSE;

   null->base.screen = null->event_handler->new_sw_screen(&null->base, ws);
   if (!null->base.screen) {
      if (ws->destroy)
         ws->destroy(ws);
      return FALSE;
   }

   if (!null_display_init_config(&null->base)) {
      ndpy_uninit(&null->base);
      return FALSE;
   }

   return TRUE;
}