[Mesa-dev] [PATCH 2/9] g3dvl: Add get_clear_color capability

Emeric Grange emeric.grange at gmail.com
Mon Sep 12 14:39:26 PDT 2011


Signed-off-by: Emeric Grange <emeric.grange at gmail.com>
Reviewed-by: Christian König <deathsimple at vodafone.de>
---
 src/gallium/auxiliary/vl/vl_compositor.c |   12 ++++++++++++
 src/gallium/auxiliary/vl/vl_compositor.h |    6 ++++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c
index eac101f..ebe6d7a 100644
--- a/src/gallium/auxiliary/vl/vl_compositor.c
+++ b/src/gallium/auxiliary/vl/vl_compositor.c
@@ -563,6 +563,18 @@ vl_compositor_set_clear_color(struct vl_compositor *c, float color[4])
 }
 
 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)
 {
    unsigned i, j;
diff --git a/src/gallium/auxiliary/vl/vl_compositor.h b/src/gallium/auxiliary/vl/vl_compositor.h
index 73d38c9..0b9b993 100644
--- a/src/gallium/auxiliary/vl/vl_compositor.h
+++ b/src/gallium/auxiliary/vl/vl_compositor.h
@@ -113,6 +113,12 @@ 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
  */
 /*@{*/
-- 
1.7.6.1



More information about the mesa-dev mailing list