diff options
author | Eric Anholt <anholt@freebsd.org> | 2004-05-17 05:31:21 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2004-05-17 05:31:21 +0000 |
commit | 3ee9ea7cda8fe71abc77151e1a94b4dfc06767b8 (patch) | |
tree | 2294febb139018f7d1b70fd287771b26cef65237 | |
parent | 70b1be1b819b7ebacf268dfb498a3adab133916e (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-- | ChangeLog | 12 | ||||
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | tests.c | 33 |
4 files changed, 28 insertions, 21 deletions
@@ -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. + @@ -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) @@ -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"); |