vl_compositor_render(struct vl_compositor_state *s,
struct vl_compositor *c,
struct pipe_surface *dst_surface,
- struct u_rect *dirty_area)
+ struct u_rect *dirty_area,
+ bool clear_dirty)
{
assert(c);
assert(dst_surface);
gen_vertex_data(c, s, dirty_area);
- if (dirty_area && (dirty_area->x0 < dirty_area->x1 ||
- dirty_area->y0 < dirty_area->y1)) {
+ if (clear_dirty && dirty_area &&
+ (dirty_area->x0 < dirty_area->x1 || dirty_area->y0 < dirty_area->y1)) {
c->pipe->clear_render_target(c->pipe, dst_surface, &s->clear_color,
0, 0, dst_surface->width, dst_surface->height);
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);
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);
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);
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);