summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/vdpau/presentation.c
diff options
context:
space:
mode:
authorChristian König <deathsimple@vodafone.de>2012-02-25 12:26:37 +0100
committerChristian König <deathsimple@vodafone.de>2012-03-01 15:06:55 +0100
commitc14c84f383309ee0fdf007c0d3e968c38f3af86e (patch)
treefbf5050c11df315d3f4728307e273e0f91e6f42c /src/gallium/state_trackers/vdpau/presentation.c
parent91ac681113b05f8fe4dff51c3b80f967ac05c867 (diff)
vl: move dirty area handling into winsys abstraction
Fixing uninitialized areas in SwapBuffers mode. Signed-off-by: Christian König <deathsimple@vodafone.de>
Diffstat (limited to 'src/gallium/state_trackers/vdpau/presentation.c')
-rw-r--r--src/gallium/state_trackers/vdpau/presentation.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c
index e3ad03a2a51..37c5c695e4d 100644
--- a/src/gallium/state_trackers/vdpau/presentation.c
+++ b/src/gallium/state_trackers/vdpau/presentation.c
@@ -73,8 +73,6 @@ vlVdpPresentationQueueCreate(VdpDevice device,
goto no_compositor;
}
- vl_compositor_reset_dirty_area(&pq->dirty_area);
-
*presentation_queue = vlAddDataHTAB(pq);
if (*presentation_queue == 0) {
ret = VDP_STATUS_ERROR;
@@ -205,6 +203,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue,
struct pipe_resource *tex;
struct pipe_surface surf_templ, *surf_draw;
struct pipe_video_rect src_rect, dst_clip;
+ struct u_rect *dirty_area;
pq = vlGetDataHTAB(presentation_queue);
if (!pq)
@@ -216,6 +215,8 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue,
if (!tex)
return VDP_STATUS_INVALID_HANDLE;
+ dirty_area = vl_screen_get_dirty_area(pq->device->vscreen);
+
memset(&surf_templ, 0, sizeof(surf_templ));
surf_templ.format = tex->format;
surf_templ.usage = PIPE_BIND_RENDER_TARGET;
@@ -239,7 +240,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue,
vl_compositor_clear_layers(&pq->compositor);
vl_compositor_set_rgba_layer(&pq->compositor, 0, surf->sampler_view, &src_rect, NULL);
- vl_compositor_render(&pq->compositor, surf_draw, NULL, &dst_clip, &pq->dirty_area);
+ vl_compositor_render(&pq->compositor, surf_draw, NULL, &dst_clip, dirty_area);
pipe->screen->flush_frontbuffer
(