static void
ximage_surface_destroy(struct native_surface *nsurf)
{
   struct ximage_surface *xsurf = ximage_surface(nsurf);

   resource_surface_destroy(xsurf->rsurf);
   FREE(xsurf);
}
Exemple #2
0
static void
fbdev_surface_destroy(struct native_surface *nsurf)
{
   struct fbdev_surface *fbsurf = fbdev_surface(nsurf);

   resource_surface_destroy(fbsurf->rsurf);
   FREE(fbsurf);
}
Exemple #3
0
static void
gdi_surface_destroy(struct native_surface *nsurf)
{
   struct gdi_surface *gsurf = gdi_surface(nsurf);

   resource_surface_destroy(gsurf->rsurf);
   FREE(gsurf);
}
static void
psl1ght_surface_destroy(struct native_surface *nsurf)
{
   struct psl1ght_surface *pssurf = psl1ght_surface(nsurf);

   resource_surface_destroy(pssurf->rsurf);
   FREE(pssurf);
}
Exemple #5
0
static void
wayland_surface_destroy(struct native_surface *nsurf)
{
   struct wayland_surface *surface = wayland_surface(nsurf);
   enum wayland_buffer_type buffer;

   for (buffer = 0; buffer < WL_BUFFER_COUNT; ++buffer) {
      if (surface->buffer[buffer])
         wl_buffer_destroy(surface->buffer[buffer]);
   }

   resource_surface_destroy(surface->rsurf);
   FREE(surface);
}
Exemple #6
0
static void
drm_surface_destroy(struct native_surface *nsurf)
{
   struct drm_surface *drmsurf = drm_surface(nsurf);

   resource_surface_wait(drmsurf->rsurf);
   if (drmsurf->current_crtc.crtc)
         drmModeFreeCrtc(drmsurf->current_crtc.crtc);

   if (drmsurf->front_fb.buffer_id)
      drmModeRmFB(drmsurf->drmdpy->fd, drmsurf->front_fb.buffer_id);
   pipe_resource_reference(&drmsurf->front_fb.texture, NULL);

   if (drmsurf->back_fb.buffer_id)
      drmModeRmFB(drmsurf->drmdpy->fd, drmsurf->back_fb.buffer_id);
   pipe_resource_reference(&drmsurf->back_fb.texture, NULL);

   resource_surface_destroy(drmsurf->rsurf);
   FREE(drmsurf);
}