diff options
author | Christian König <christian.koenig@amd.com> | 2013-04-29 17:43:04 +0200 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2013-05-01 13:33:46 +0200 |
commit | e27f87b549cf2d4cfef97958ff175862fdf494b0 (patch) | |
tree | 6d01f968ab957632f3fe94432d91d022d8c924f1 /src/gallium/state_trackers/vdpau | |
parent | 236ea7900ff263fdb3d01e1a904c43c600e2654d (diff) |
vl/compositor: cleanup background clearing
Add an extra parameter to specify if we should clear the render target.
Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'src/gallium/state_trackers/vdpau')
-rw-r--r-- | src/gallium/state_trackers/vdpau/device.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/mixer.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/output.c | 12 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/presentation.c | 2 |
4 files changed, 7 insertions, 11 deletions
diff --git a/src/gallium/state_trackers/vdpau/device.c b/src/gallium/state_trackers/vdpau/device.c index dd586f52856..c530f431644 100644 --- a/src/gallium/state_trackers/vdpau/device.c +++ b/src/gallium/state_trackers/vdpau/device.c @@ -279,7 +279,7 @@ vlVdpResolveDelayedRendering(vlVdpDevice *dev, struct pipe_surface *surface, str dirty_area = &vlsurface->dirty_area; } - vl_compositor_render(cstate, &dev->compositor, surface, dirty_area); + vl_compositor_render(cstate, &dev->compositor, surface, dirty_area, true); dev->delayed_rendering.surface = VDP_INVALID_HANDLE; dev->delayed_rendering.cstate = NULL; diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c index 81a5c293685..1d2ae497b07 100644 --- a/src/gallium/state_trackers/vdpau/mixer.c +++ b/src/gallium/state_trackers/vdpau/mixer.c @@ -312,7 +312,7 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer, if (!vmixer->noise_reduction.filter && !vmixer->sharpness.filter) vlVdpSave4DelayedRendering(vmixer->device, destination_surface, &vmixer->cstate); else { - vl_compositor_render(&vmixer->cstate, compositor, dst->surface, &dst->dirty_area); + vl_compositor_render(&vmixer->cstate, compositor, dst->surface, &dst->dirty_area, true); /* applying the noise reduction after scaling is actually not very clever, but currently we should avoid to copy around the image diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c index df0f45856f9..7266cdb8afa 100644 --- a/src/gallium/state_trackers/vdpau/output.c +++ b/src/gallium/state_trackers/vdpau/output.c @@ -382,8 +382,7 @@ vlVdpOutputSurfacePutBitsIndexed(VdpOutputSurface surface, vl_compositor_clear_layers(cstate); vl_compositor_set_palette_layer(cstate, compositor, 0, sv_idx, sv_tbl, NULL, NULL, false); vl_compositor_set_layer_dst_area(cstate, 0, RectToPipe(destination_rect, &dst_rect)); - vl_compositor_render(cstate, compositor, vlsurface->surface, NULL); - vl_compositor_reset_dirty_area(&vlsurface->dirty_area); + vl_compositor_render(cstate, compositor, vlsurface->surface, &vlsurface->dirty_area, false); pipe_sampler_view_reference(&sv_idx, NULL); pipe_sampler_view_reference(&sv_tbl, NULL); @@ -489,8 +488,7 @@ vlVdpOutputSurfacePutBitsYCbCr(VdpOutputSurface surface, vl_compositor_clear_layers(cstate); vl_compositor_set_buffer_layer(cstate, compositor, 0, vbuffer, NULL, NULL, VL_COMPOSITOR_WEAVE); vl_compositor_set_layer_dst_area(cstate, 0, RectToPipe(destination_rect, &dst_rect)); - vl_compositor_render(cstate, compositor, vlsurface->surface, NULL); - vl_compositor_reset_dirty_area(&vlsurface->dirty_area); + vl_compositor_render(cstate, compositor, vlsurface->surface, &vlsurface->dirty_area, false); vbuffer->destroy(vbuffer); pipe_mutex_unlock(vlsurface->device->mutex); @@ -660,8 +658,7 @@ vlVdpOutputSurfaceRenderOutputSurface(VdpOutputSurface destination_surface, RectToPipe(source_rect, &src_rect), NULL, ColorsToPipe(colors, flags, vlcolors)); vl_compositor_set_layer_dst_area(cstate, 0, RectToPipe(destination_rect, &dst_rect)); - vl_compositor_render(cstate, compositor, dst_vlsurface->surface, NULL); - vl_compositor_reset_dirty_area(&dst_vlsurface->dirty_area); + vl_compositor_render(cstate, compositor, dst_vlsurface->surface, &dst_vlsurface->dirty_area, false); context->delete_blend_state(context, blend); pipe_mutex_unlock(dst_vlsurface->device->mutex); @@ -720,8 +717,7 @@ vlVdpOutputSurfaceRenderBitmapSurface(VdpOutputSurface destination_surface, RectToPipe(source_rect, &src_rect), NULL, ColorsToPipe(colors, flags, vlcolors)); vl_compositor_set_layer_dst_area(cstate, 0, RectToPipe(destination_rect, &dst_rect)); - vl_compositor_render(cstate, compositor, dst_vlsurface->surface, NULL); - vl_compositor_reset_dirty_area(&dst_vlsurface->dirty_area); + vl_compositor_render(cstate, compositor, dst_vlsurface->surface, &dst_vlsurface->dirty_area, false); context->delete_blend_state(context, blend); pipe_mutex_unlock(dst_vlsurface->device->mutex); diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c index 3dd7f05375e..a5466cd378a 100644 --- a/src/gallium/state_trackers/vdpau/presentation.c +++ b/src/gallium/state_trackers/vdpau/presentation.c @@ -264,7 +264,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue, vl_compositor_clear_layers(cstate); vl_compositor_set_rgba_layer(cstate, compositor, 0, surf->sampler_view, &src_rect, NULL, NULL); vl_compositor_set_dst_clip(cstate, &dst_clip); - vl_compositor_render(cstate, compositor, surf_draw, dirty_area); + vl_compositor_render(cstate, compositor, surf_draw, dirty_area, true); } vl_screen_set_next_timestamp(pq->device->vscreen, earliest_presentation_time); |