Demos (master): egl/openvg: Add VG_BLEND_ADDITIVE test to blend demo.

Chia-I Wu olv at kemper.freedesktop.org
Sat Dec 4 16:01:06 UTC 2010


Module: Demos
Branch: master
Commit: c6979b7257da34e6c1656bb0f863532ee0a7d128
URL:    http://cgit.freedesktop.org/mesa/demos/commit/?id=c6979b7257da34e6c1656bb0f863532ee0a7d128

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Sat Dec  4 23:59:44 2010 +0800

egl/openvg: Add VG_BLEND_ADDITIVE test to blend demo.

---

 src/egl/openvg/trivial/blend.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/egl/openvg/trivial/blend.c b/src/egl/openvg/trivial/blend.c
index 2724481..83a1c41 100644
--- a/src/egl/openvg/trivial/blend.c
+++ b/src/egl/openvg/trivial/blend.c
@@ -217,6 +217,18 @@ test_blend(VGint x, VGint y, VGint width, VGint height, VGboolean check)
    }
    x += width + 5;
 
+   vgSeti(VG_BLEND_MODE, VG_BLEND_ADDITIVE);
+   rectangle(x, y, width, height);
+   if (check) {
+      for (i = 0; i < 4; i++) {
+         out[i] = src[i] + dst[i];
+         if (out[i] > 1.0f)
+            out[i] = 1.0f;
+      }
+      CHECK("VG_BLEND_ADDITIVE");
+   }
+   x += width + 5;
+
    if (check)
       printf("done\n");
 }




More information about the mesa-commit mailing list