summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-04-26 11:34:23 +0200
committerChristian König <[email protected]>2011-04-26 11:48:33 +0200
commit67d93ea940a9cac1645ce4d6bdc78c5aad812cb6 (patch)
treed796c6d2811044fe8e79f174cd37a1762e06f5a8 /src/gallium/state_trackers/vdpau
parent13a50bd47deff3e52470a513695c1bdb86908d73 (diff)
vdpau: implement PresentationQueueDestroy
Diffstat (limited to 'src/gallium/state_trackers/vdpau')
-rw-r--r--src/gallium/state_trackers/vdpau/presentation.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c
index 2837e7a306f..1e2c78616e9 100644
--- a/src/gallium/state_trackers/vdpau/presentation.c
+++ b/src/gallium/state_trackers/vdpau/presentation.c
@@ -66,8 +66,8 @@ vlVdpPresentationQueueCreate(VdpDevice device,
return VDP_STATUS_RESOURCES;
pq->device = dev;
- pq->compositor = context->create_compositor(context);
pq->drawable = pqt->drawable;
+ pq->compositor = context->create_compositor(context);
if (!pq->compositor) {
ret = VDP_STATUS_ERROR;
goto no_compositor;
@@ -89,7 +89,20 @@ no_compositor:
VdpStatus
vlVdpPresentationQueueDestroy(VdpPresentationQueue presentation_queue)
{
- return VDP_STATUS_NO_IMPLEMENTATION;
+ vlVdpPresentationQueue *pq;
+
+ _debug_printf("[VDPAU] Destroying PresentationQueue\n");
+
+ pq = vlGetDataHTAB(presentation_queue);
+ if (!pq)
+ return VDP_STATUS_INVALID_HANDLE;
+
+ pq->compositor->destroy(pq->compositor);
+
+ vlRemoveDataHTAB(presentation_queue);
+ FREE(pq);
+
+ return VDP_STATUS_OK;
}
VdpStatus