From: Emeric Grange Date: Mon, 12 Sep 2011 21:39:26 +0000 (+0200) Subject: g3dvl: Add get_clear_color capability X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=42fddacabafebd4c9f1ba2f8f94192f8f4f76fce;p=mesa.git g3dvl: Add get_clear_color capability Signed-off-by: Emeric Grange Reviewed-by: Christian König --- diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index eac101f3aa7..ebe6d7ae45c 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.c +++ b/src/gallium/auxiliary/vl/vl_compositor.c @@ -562,6 +562,18 @@ vl_compositor_set_clear_color(struct vl_compositor *c, float color[4]) c->clear_color[i] = color[i]; } +void +vl_compositor_get_clear_color(struct vl_compositor *c, float color[4]) +{ + unsigned i; + + assert(c); + assert(color); + + for (i = 0; i < 4; ++i) + color[i] = c->clear_color[i]; +} + void vl_compositor_clear_layers(struct vl_compositor *c) { diff --git a/src/gallium/auxiliary/vl/vl_compositor.h b/src/gallium/auxiliary/vl/vl_compositor.h index 73d38c96ba8..0b9b9939a8c 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.h +++ b/src/gallium/auxiliary/vl/vl_compositor.h @@ -112,6 +112,12 @@ vl_compositor_reset_dirty_area(struct vl_compositor *compositor); void vl_compositor_set_clear_color(struct vl_compositor *compositor, float color[4]); +/** + * get the clear color + */ +void +vl_compositor_get_clear_color(struct vl_compositor *compositor, float color[4]); + /** * set overlay samplers */