diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-12-01 13:56:07 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-12-01 18:19:35 +0000 |
commit | 903b5030826ab6915d354aa95a4e36c3dd684989 (patch) | |
tree | f042fa5b3bf67bd20c60a38fbc3e419b4a62e82e /t_gradient.c | |
parent | 55612909182c253bbfe8278a8867c93c9b09bc01 (diff) |
Split out printing the results from eval_diff()
Separate the evalation of two colors given a format and the printing of
the result. This allows eval_diff() to be used elsewhere and also means
that we do not need to waste cycles generating unused strings for
eval_diff() [this accounts for as much time as composite_op!]. As part
of this process pass in the expected accuracy of the operation to
eval_diff().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 't_gradient.c')
-rw-r--r-- | t_gradient.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/t_gradient.c b/t_gradient.c index 379c163..4f84403 100644 --- a/t_gradient.c +++ b/t_gradient.c @@ -305,8 +305,11 @@ Bool linear_gradient_test(Display *dpy, picture_info *win, &expected, False); color_correct(dst, &expected); - snprintf(testname, 40, "%s linear gradient", ops[op].name); - if (!eval_diff(testname, &expected, &tested, 0, 0, is_verbose)) { + if (eval_diff(&dst->format->direct, &expected, &tested) > 3.) { + snprintf(testname, 40, + "%s linear gradient", ops[op].name); + print_fail(testname, &expected, &tested, 0, 0, + eval_diff(&dst->format->direct, &expected, &tested)); printf("gradient: %d stops: %d repeat: %d pos: %d/%d\n" "src color: %.2f %.2f %.2f %.2f\n" "dst color: %.2f %.2f %.2f %.2f\n", |