diff options
author | Dave Airlie <airlied@redhat.com> | 2015-06-04 12:23:55 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-06-04 12:23:55 +1000 |
commit | 0f00d5ac7cb0052dbe6357023154fc97759a58f1 (patch) | |
tree | d9b863949da182d21450546ef1d65c0b7d61c2b9 | |
parent | 51fed2fd1252eb8165489e918a478083b32ce4bf (diff) |
rendercheck: constrain accuracy
This fixes a bunch of Dst operator, when the dst color
is r5g5b5.
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | t_gradient.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/t_gradient.c b/t_gradient.c index 1096f9a..32df8c4 100644 --- a/t_gradient.c +++ b/t_gradient.c @@ -293,7 +293,7 @@ Bool linear_gradient_test(Display *dpy, picture_info *win, pix = test_pixels; while (pix->x >= 0) { - + XRenderDirectFormat acc; get_pixel(dpy, dst, pix->x, pix->y, &tested); calculate_linear_gradient_color(pix->x, pix->y, &linear_gradient_points[p], @@ -305,7 +305,9 @@ Bool linear_gradient_test(Display *dpy, picture_info *win, &expected, False); color_correct(dst, &expected); - if (eval_diff(&dst->format->direct, &expected, &tested) > 3.) { + accuracy(&acc, &dst->format->direct, &dst_color->format->direct); + + if (eval_diff(&acc, &expected, &tested) > 3.) { snprintf(testname, 40, "%s linear gradient", ops[op].name); print_fail(testname, &expected, &tested, 0, 0, |