g3dvl: Add get_clear_color capability
authorEmeric Grange <emeric.grange@gmail.com>
Mon, 12 Sep 2011 21:39:26 +0000 (23:39 +0200)
committerChristian König <deathsimple@vodafone.de>
Wed, 14 Sep 2011 13:49:15 +0000 (15:49 +0200)
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
src/gallium/auxiliary/vl/vl_compositor.c
src/gallium/auxiliary/vl/vl_compositor.h

index eac101f3aa7d2623d5d36b2473198335d2cd43a2..ebe6d7ae45c0a512fa45b8b69693391e10687636 100644 (file)
@@ -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)
 {
index 73d38c96ba811815bc58c4d9675a0955183145c8..0b9b9939a8caff0cb45258f49bf3a93183248f4f 100644 (file)
@@ -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
  */