vdpau: implement PresentationQueueSetBackgroundColor
authorChristian König <deathsimple@vodafone.de>
Sat, 7 May 2011 13:00:52 +0000 (15:00 +0200)
committerChristian König <deathsimple@vodafone.de>
Sat, 7 May 2011 13:00:52 +0000 (15:00 +0200)
src/gallium/state_trackers/vdpau/presentation.c

index 2f029f07fb1c713a4a2aa8eedd611032508cd042..02fcfbd0746d9dbe2a37720bab73f9a8dfa78970 100644 (file)
@@ -109,10 +109,20 @@ VdpStatus
 vlVdpPresentationQueueSetBackgroundColor(VdpPresentationQueue presentation_queue,
                                          VdpColor *const background_color)
 {
+   vlVdpPresentationQueue *pq;
+
+   VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Setting Background Color\n");
+
    if (!background_color)
       return VDP_STATUS_INVALID_POINTER;
 
-   return VDP_STATUS_NO_IMPLEMENTATION;
+   pq = vlGetDataHTAB(presentation_queue);
+   if (!pq)
+      return VDP_STATUS_INVALID_HANDLE;
+
+   pq->compositor->set_clear_color(pq->compositor, (float*)background_color);
+
+   return VDP_STATUS_OK;
 }
 
 VdpStatus