static void virgl_drm_winsys_destroy(struct virgl_winsys *qws) { struct virgl_drm_winsys *qdws = virgl_drm_winsys(qws); virgl_cache_flush(qdws); util_hash_table_destroy(qdws->bo_handles); util_hash_table_destroy(qdws->bo_names); mtx_destroy(&qdws->bo_handles_mutex); mtx_destroy(&qdws->mutex); FREE(qdws); }
static void radeon_bomgr_destroy(struct pb_manager *_mgr) { struct radeon_bomgr *mgr = radeon_bomgr(_mgr); util_hash_table_destroy(mgr->bo_handles); pipe_mutex_destroy(mgr->bo_handles_mutex); FREE(mgr); }
static void vmw_swc_destroy(struct svga_winsys_context *swc) { struct vmw_svga_winsys_context *vswc = vmw_svga_winsys_context(swc); unsigned i; for(i = 0; i < vswc->surface.used; ++i) { struct vmw_ctx_validate_item *isurf = &vswc->surface.items[i]; if (isurf->referenced) p_atomic_dec(&isurf->vsurf->validated); vmw_svga_winsys_surface_reference(&isurf->vsurf, NULL); } for(i = 0; i < vswc->shader.used; ++i) { struct vmw_ctx_validate_item *ishader = &vswc->shader.items[i]; if (ishader->referenced) p_atomic_dec(&ishader->vshader->validated); vmw_svga_winsys_shader_reference(&ishader->vshader, NULL); } util_hash_table_destroy(vswc->hash); pb_validate_destroy(vswc->validate); vmw_ioctl_context_destroy(vswc->vws, swc->cid); #ifdef DEBUG debug_flush_ctx_destroy(vswc->fctx); #endif FREE(vswc); }
void NineResource9_dtor( struct NineResource9 *This ) { if (This->pdata) { util_hash_table_foreach(This->pdata, ht_guid_delete, NULL); util_hash_table_destroy(This->pdata); } /* NOTE: We do have to use refcounting, the driver might * still hold a reference. */ pipe_resource_reference(&This->resource, NULL); /* release allocated system memory for non-D3DPOOL_DEFAULT resources */ if (This->data) FREE(This->data); NineUnknown_dtor(&This->base); }
static void dri2_display_destroy(struct native_display *ndpy) { struct dri2_display *dri2dpy = dri2_display(ndpy); FREE(dri2dpy->configs); if (dri2dpy->base.screen) dri2dpy->base.screen->destroy(dri2dpy->base.screen); if (dri2dpy->surfaces) util_hash_table_destroy(dri2dpy->surfaces); if (dri2dpy->xscr) x11_screen_destroy(dri2dpy->xscr); if (dri2dpy->own_dpy) XCloseDisplay(dri2dpy->dpy); FREE(dri2dpy); }
static OMX_ERRORTYPE h264d_prc_deallocate_resources(void *ap_obj) { vid_dec_PrivateType*priv = ap_obj; assert(priv); /* Clear hash table */ util_hash_table_foreach(priv->video_buffer_map, &hash_table_clear_item_callback, NULL); util_hash_table_destroy(priv->video_buffer_map); if (priv->pipe) { vl_compositor_cleanup_state(&priv->cstate); vl_compositor_cleanup(&priv->compositor); priv->pipe->destroy(priv->pipe); } if (priv->screen) omx_put_screen(); return OMX_ErrorNone; }
static void dri2_display_destroy(struct native_display *ndpy) { struct dri2_display *dri2dpy = dri2_display(ndpy); FREE(dri2dpy->configs); if (dri2dpy->base.screen) dri2dpy->base.screen->destroy(dri2dpy->base.screen); if (dri2dpy->surfaces) util_hash_table_destroy(dri2dpy->surfaces); #ifdef HAVE_WAYLAND_BACKEND wayland_drm_bufmgr_destroy(ndpy->wayland_bufmgr); #endif if (dri2dpy->xscr) x11_screen_destroy(dri2dpy->xscr); if (dri2dpy->own_dpy) XCloseDisplay(dri2dpy->dpy); FREE(dri2dpy); }