diff options
author | Christian König <[email protected]> | 2011-12-12 15:27:34 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2011-12-14 14:19:41 +0100 |
commit | 167b1b32c5ff30d514253072ce54513112c03d4d (patch) | |
tree | 2b49f67962ec5afc5050834f87b8fe08197cab5d /src/gallium/state_trackers/vdpau | |
parent | 606d3a3c3de94665e47df47b48596293d588a420 (diff) |
g3dvl/compositor: improve dirty area handling
Take viewport and scissors into account and make
the dirty area a parameter instead of a member.
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/vdpau')
-rw-r--r-- | src/gallium/state_trackers/vdpau/mixer.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/output.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/presentation.c | 4 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/vdpau_private.h | 2 |
4 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c index ed5a6464088..5657e7c83b0 100644 --- a/src/gallium/state_trackers/vdpau/mixer.c +++ b/src/gallium/state_trackers/vdpau/mixer.c @@ -173,7 +173,7 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, vl_compositor_clear_layers(&vmixer->compositor); vl_compositor_set_buffer_layer(&vmixer->compositor, 0, surf->video_buffer, RectToPipe(video_source_rect, &src_rect), NULL); - vl_compositor_render(&vmixer->compositor, dst->surface, NULL, NULL, false); + vl_compositor_render(&vmixer->compositor, dst->surface, NULL, NULL, NULL); return VDP_STATUS_OK; } diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c index 0d2f35a433c..d83831e5dd2 100644 --- a/src/gallium/state_trackers/vdpau/output.c +++ b/src/gallium/state_trackers/vdpau/output.c @@ -312,7 +312,7 @@ vlVdpOutputSurfacePutBitsIndexed(VdpOutputSurface surface, vl_compositor_clear_layers(compositor); vl_compositor_set_palette_layer(compositor, 0, sv_idx, sv_tbl, NULL, NULL, false); vl_compositor_render(compositor, vlsurface->surface, - RectToPipe(destination_rect, &dst_rect), NULL, false); + RectToPipe(destination_rect, &dst_rect), NULL, NULL); pipe_sampler_view_reference(&sv_idx, NULL); pipe_sampler_view_reference(&sv_tbl, NULL); diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c index 888cf31d5af..df38f637de9 100644 --- a/src/gallium/state_trackers/vdpau/presentation.c +++ b/src/gallium/state_trackers/vdpau/presentation.c @@ -75,6 +75,8 @@ 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; @@ -234,7 +236,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue, 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, &vo_rect, true); + vl_compositor_render(&pq->compositor, drawable_surface, NULL, &vo_rect, &pq->dirty_area); pipe = pq->device->context->pipe; diff --git a/src/gallium/state_trackers/vdpau/vdpau_private.h b/src/gallium/state_trackers/vdpau/vdpau_private.h index aae6f7841a6..eba9e2f2d37 100644 --- a/src/gallium/state_trackers/vdpau/vdpau_private.h +++ b/src/gallium/state_trackers/vdpau/vdpau_private.h @@ -37,6 +37,7 @@ #include "pipe/p_video_decoder.h" #include "util/u_debug.h" +#include "util/u_rect.h" #include "vl/vl_compositor.h" #include "vl_winsys.h" @@ -298,6 +299,7 @@ typedef struct vlVdpDevice *device; Drawable drawable; struct vl_compositor compositor; + struct u_rect dirty_area; } vlVdpPresentationQueue; typedef struct |