summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2004-05-17 05:31:21 +0000
committerEric Anholt <anholt@freebsd.org>2004-05-17 05:31:21 +0000
commit3ee9ea7cda8fe71abc77151e1a94b4dfc06767b8 (patch)
tree2294febb139018f7d1b70fd287771b26cef65237
parent70b1be1b819b7ebacf268dfb498a3adab133916e (diff)
- get_pixel was not at fault, and get destcoords_test working.RENDERCHECK-1_0_1
- Change fill_test from being a duplication of the blend tests to a test of whether the XRenderFillRectangle()s produced the expected results. - Update TODO list. - Bump version to 1.0.1.
-rw-r--r--ChangeLog12
-rw-r--r--TODO2
-rw-r--r--configure.ac2
-rw-r--r--tests.c33
4 files changed, 28 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index e69de29..2dd86a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -0,0 +1,12 @@
+2004-05-16 Eric Anholt <anholt@FreeBSD.org>
+
+ * TODO:
+ * tests.c: (get_pixel), (fill_test), (destcoords_test),
+ (begin_test):
+ - get_pixel was not at fault, and get destcoords_test working.
+ - Change fill_test from being a duplication of the blend tests
+ to a test of whether the XRenderFillRectangle()s produced the
+ expected results.
+ - Update TODO list.
+ - Bump version to 1.0.1.
+
diff --git a/TODO b/TODO
index 8434c8f..b471737 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,5 @@
-- Fix dest coords check (get_pixel broken)
- Get a useful number being produced for error values, and correct eval_diff's limit.
- Check transforms
- check source/mask pixels falling outside the drawable.
- Command line args for verbosity, what tests, move iter, etc.
+- Check repeating of sources with various sizes.
diff --git a/configure.ac b/configure.ac
index f1fd779..69b5abd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
AC_PREREQ(2.57)
AC_INIT([rendercheck],
- 1.0,
+ 1.0.1,
[anholt@FreeBSD.org],
rendercheck)
diff --git a/tests.c b/tests.c
index d999189..c4de8f2 100644
--- a/tests.c
+++ b/tests.c
@@ -126,11 +126,7 @@ get_pixel(Display *dpy, picture_info *pi, int x, int y, color4d *color)
unsigned long val;
unsigned long rm, gm, bm, am;
- /* XXX: I am xlib clueless, and this function appears to not work right.
- * I think it just always gets the 0,0 pixel, but I'm not sure.
- */
image = XGetImage(dpy, pi->d, x, y, 1, 1, 0xffffffff, ZPixmap);
- /*val = image->f.get_pixel(image, x, y);*/
val = *(unsigned long *)image->data;
@@ -192,20 +188,16 @@ eval_diff(char *name, color4d *expected, color4d *test, int x, int y,
}
static Bool
-fill_test(Display *dpy, picture_info *win, picture_info *src, picture_info *dst)
+fill_test(Display *dpy, picture_info *win, picture_info *src)
{
- color4d expected, tested;
+ color4d tested;
- XRenderComposite(dpy, PictOpSrc, src->pict, 0, dst->pict, 0, 0, 0, 0,
- 0, 0, win_width, win_height);
- get_pixel(dpy, dst, 0, 0, &tested);
+ get_pixel(dpy, src, 0, 0, &tested);
/* Copy the output to the window, so the user sees something visual. */
- XRenderComposite(dpy, PictOpSrc, dst->pict, 0, win->pict, 0, 0, 0, 0,
+ XRenderComposite(dpy, PictOpSrc, src->pict, 0, win->pict, 0, 0, 0, 0,
0, 0, win_width, win_height);
- expected = src->color;
- color_correct(dst, &expected);
- return eval_diff("fill", &expected, &tested, 0, 0, is_verbose);
+ return eval_diff("fill", &src->color, &tested, 0, 0, is_verbose);
}
static Bool
@@ -226,7 +218,7 @@ destcoords_test(Display *dpy, picture_info *win, picture_info *dst,
for (x = 0; x < 3; x++) {
for (y = 0; y < 3; y++) {
- get_pixel(dpy, dst, 0, 0, &tested);
+ get_pixel(dpy, dst, x, y, &tested);
if (x == 1 && y == 1)
expected = fg->color;
else
@@ -574,11 +566,14 @@ begin_test(Display *dpy, picture_info *win)
&color, x, y, 1, 1);
}
- printf("Beginning fill test\n");
- for (i = 0; i < num_dests; i++) {
- for (j = 0; j < num_colors * num_formats; j++) {
- fill_test(dpy, win, &pictures_1x1[j], &dests[i]);
- }
+ printf("Beginning testing of filling of 1x1R pictures\n");
+ for (i = 0; i < num_colors * num_formats; i++) {
+ fill_test(dpy, win, &pictures_1x1[i]);
+ }
+
+ printf("Beginning testing of filling of 10x10 pictures\n");
+ for (i = 0; i < num_colors * num_formats; i++) {
+ fill_test(dpy, win, &pictures_10x10[i]);
}
printf("Beginning dest coords test\n");