st/vdpau: Output surfaces that are too large to fit into the display target will...
authorEmeric Grange <emeric.grange@gmail.com>
Mon, 12 Sep 2011 21:39:32 +0000 (23:39 +0200)
committerChristian König <deathsimple@vodafone.de>
Wed, 14 Sep 2011 13:49:16 +0000 (15:49 +0200)
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
src/gallium/state_trackers/vdpau/presentation.c

index b3b543b4a80d44a91445e4838cb4c15cabee4380..d83dde647ee8b04304e275d349887f3101c33628 100644 (file)
@@ -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
    (