[Mesa-dev] [PATCH 7/9] st/vdpau: Add get_clear_color capability

Emeric Grange emeric.grange at gmail.com
Mon Sep 12 14:39:31 PDT 2011


Signed-off-by: Emeric Grange <emeric.grange at gmail.com>
Reviewed-by: Christian König <deathsimple at vodafone.de>
---
 src/gallium/state_trackers/vdpau/presentation.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c
index 927350b..b3b543b 100644
--- a/src/gallium/state_trackers/vdpau/presentation.c
+++ b/src/gallium/state_trackers/vdpau/presentation.c
@@ -139,12 +139,20 @@ VdpStatus
 vlVdpPresentationQueueGetBackgroundColor(VdpPresentationQueue presentation_queue,
                                          VdpColor *const background_color)
 {
+   vlVdpPresentationQueue *pq;
+
    VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Getting 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;
+
+   vl_compositor_get_clear_color(&pq->compositor, (float*)background_color);
+
+   return VDP_STATUS_OK;
 }
 
 /**
-- 
1.7.6.1



More information about the mesa-dev mailing list