diff options
author | Christian König <[email protected]> | 2013-04-29 17:43:04 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2013-05-01 13:33:46 +0200 |
commit | e27f87b549cf2d4cfef97958ff175862fdf494b0 (patch) | |
tree | 6d01f968ab957632f3fe94432d91d022d8c924f1 /src/gallium/auxiliary | |
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 <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_compositor.c | 7 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_compositor.h | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index 0df2b570d00..1c393a99de6 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.c +++ b/src/gallium/auxiliary/vl/vl_compositor.c @@ -986,7 +986,8 @@ void 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); @@ -1004,8 +1005,8 @@ vl_compositor_render(struct vl_compositor_state *s, 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); diff --git a/src/gallium/auxiliary/vl/vl_compositor.h b/src/gallium/auxiliary/vl/vl_compositor.h index 6de6ca06521..2a1f66cfb16 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.h +++ b/src/gallium/auxiliary/vl/vl_compositor.h @@ -224,7 +224,8 @@ void vl_compositor_render(struct vl_compositor_state *state, struct vl_compositor *compositor, struct pipe_surface *dst_surface, - struct u_rect *dirty_area); + struct u_rect *dirty_area, + bool clear_dirty); /** * destroy this compositor |