rendercheck: 2 commits - tests.c

Tilman Sauerbeck tilman at kemper.freedesktop.org
Wed Sep 13 23:26:27 EEST 2006


 tests.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

New commits:
diff-tree 003f341cf695f66b81d21f255bd816ae825f4ab3 (from 095d7346b2a58c48609c1c8d75e5e21e25230b73)
Author: Tilman Sauerbeck <tilman at code-monkey.de>
Date:   Wed Sep 13 22:26:16 2006 +0200

    Set the format field for the solid pictures, too.
    
    It's needed in case an error occurs at the tests where they are used,
    because then the picture format will be evaluated by describe_format().

diff --git a/tests.c b/tests.c
index daf3852..fed1c8c 100644
--- a/tests.c
+++ b/tests.c
@@ -382,6 +382,7 @@ do_tests(Display *dpy, picture_info *win
             c.green = (int)(colors[i].g*65535);
             c.blue = (int)(colors[i].b*65535);
             pictures_solid[i].pict = XRenderCreateSolidFill(dpy, &c);
+            pictures_solid[i].format = format_list[argb32index];
             pictures_solid[i].name = "Solid";
         }
 
diff-tree 095d7346b2a58c48609c1c8d75e5e21e25230b73 (from 053d4f3d0f4e271e5c868067137264756a11dbff)
Author: Tilman Sauerbeck <tilman at code-monkey.de>
Date:   Wed Sep 13 22:24:25 2006 +0200

    Scale the alpha channel diff, too, before calculating the final error.
    
    This makes errors that only occur in the alpha channel have a chance to be
    recognized. If the alpha channel diff isn't scaled, it can never be > 3.0.

diff --git a/tests.c b/tests.c
index 95323bf..daf3852 100644
--- a/tests.c
+++ b/tests.c
@@ -159,7 +159,7 @@ eval_diff(char *name, color4d *expected,
 	rscale = 1.0 * (1 << 5);
 	gscale = 1.0 * (1 << 6);
 	bscale = 1.0 * (1 << 5);
-	ascale = 1.0;
+	ascale = 1.0 * 32;
 	rdiff = fabs(test->r - expected->r) * rscale;
 	bdiff = fabs(test->g - expected->g) * gscale;
 	gdiff = fabs(test->b - expected->b) * bscale;



More information about the xorg-commit mailing list