[Mesa-dev] [PATCH 8/9] st/vdpau: Output surfaces that are too large to fit into the display target will be clipped

Emeric Grange emeric.grange at gmail.com
Mon Sep 12 14:39:32 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 |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c
index b3b543b..d83dde6 100644
--- a/src/gallium/state_trackers/vdpau/presentation.c
+++ b/src/gallium/state_trackers/vdpau/presentation.c
@@ -185,6 +185,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue,
    vlVdpPresentationQueue *pq;
    vlVdpOutputSurface *surf;
    struct pipe_surface *drawable_surface;
+   struct pipe_video_rect vo_rect;
 
    pq = vlGetDataHTAB(presentation_queue);
    if (!pq)
@@ -198,9 +199,14 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue,
    if (!surf)
       return VDP_STATUS_INVALID_HANDLE;
 
+   vo_rect.x = 0;
+   vo_rect.y = 0;
+   vo_rect.w = clip_width;
+   vo_rect.h = clip_height;
+
    vl_compositor_clear_layers(&pq->compositor);
    vl_compositor_set_rgba_layer(&pq->compositor, 0, surf->sampler_view, NULL, NULL);
-   vl_compositor_render(&pq->compositor, drawable_surface, NULL, NULL, true);
+   vl_compositor_render(&pq->compositor, drawable_surface, NULL, &vo_rect, true);
 
    pq->device->context->pipe->screen->flush_frontbuffer
    (
-- 
1.7.6.1



More information about the mesa-dev mailing list