From 42fddacabafebd4c9f1ba2f8f94192f8f4f76fce Mon Sep 17 00:00:00 2001 From: Emeric Grange Date: Mon, 12 Sep 2011 23:39:26 +0200 Subject: g3dvl: Add get_clear_color capability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Emeric Grange Reviewed-by: Christian König --- src/gallium/auxiliary/vl/vl_compositor.c | 12 ++++++++++++ src/gallium/auxiliary/vl/vl_compositor.h | 6 ++++++ 2 files changed, 18 insertions(+) (limited to 'src/gallium/auxiliary') 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 */ -- cgit v1.2.3