[cairo-commit] rendertest/src rendertest.c,1.9,1.10

David Reveman commit at pdx.freedesktop.org
Mon Jan 31 00:13:14 PST 2005


Committed by: davidr

Update of /cvs/cairo/rendertest/src
In directory gabe:/tmp/cvs-serv12524/src

Modified Files:
	rendertest.c 
Log Message:
Add more convolution filter tests

Index: rendertest.c
===================================================================
RCS file: /cvs/cairo/rendertest/src/rendertest.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- rendertest.c	3 Nov 2004 23:51:04 -0000	1.9
+++ rendertest.c	31 Jan 2005 08:13:12 -0000	1.10
@@ -1185,6 +1185,50 @@
     _render_set_transform (grad11x1, &_identity);
   }
 
+  if (TEST_CHECK) {
+    render_fixed16_16_t params[11];
+    int i;
+
+    /* 3x3 kernel */
+    params[0] = DOUBLE_TO_FIXED (3.0);
+    params[1] = DOUBLE_TO_FIXED (3.0);
+
+    for (i = 2; i < 11; i++)
+      params[i] = DOUBLE_TO_FIXED (1.0);
+
+    _print_info ("composite solid source in convolution filtered A mask\n",
+                 test, info.s);
+    status = _render_set_filter (a_mask,
+                                 RENDER_FILTER_CONVOLUTION,
+                                 params,
+                                 sizeof (params) /
+                                 sizeof (render_fixed16_16_t));
+    _render_composite_tests (&info, solid_blue, a_mask, status);
+    _render_set_filter (a_mask, RENDER_FILTER_NEAREST, NULL, 0);
+  }
+
+  if (TEST_CHECK) {
+    render_fixed16_16_t params[51];
+    int i;
+
+    /* 7x7 kernel */
+    params[0] = DOUBLE_TO_FIXED (7.0);
+    params[1] = DOUBLE_TO_FIXED (7.0);
+
+    for (i = 2; i < 51; i++)
+      params[i] = DOUBLE_TO_FIXED (1.0);
+
+    _print_info ("composite ARGB source in convolution filtered ARGB mask\n",
+                 test, info.s);
+    status = _render_set_filter (argb_mask,
+                                 RENDER_FILTER_CONVOLUTION,
+                                 params,
+                                 sizeof (params) /
+                                 sizeof (render_fixed16_16_t));
+    _render_composite_tests (&info, glider, argb_mask, status);
+    _render_set_filter (argb_mask, RENDER_FILTER_NEAREST, NULL, 0);
+  }
+
   surface->backend->destroy (grad2x1);
   surface->backend->destroy (grad11x1);
   surface->backend->destroy (solid_blue);




More information about the cairo-commit mailing list