summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-06-04 12:21:57 +1000
committerDave Airlie <airlied@redhat.com>2015-06-04 12:21:57 +1000
commit51fed2fd1252eb8165489e918a478083b32ce4bf (patch)
treeedfcd546179b47ae980c24a339cf367fbf79c470
parente1f078ad514fc10bfa8f9f4f9f005aad91b08b42 (diff)
rendercheck: make gradient results align with pixman
This makes rendercheck at least useful for regression testing, 18731 tests passed of 51681 total to 49373 tests passed of 51681 total Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--t_gradient.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/t_gradient.c b/t_gradient.c
index 4f84403..1096f9a 100644
--- a/t_gradient.c
+++ b/t_gradient.c
@@ -162,7 +162,7 @@ render_to_gradient_test(Display *dpy, picture_info *src)
static void gradientPixel(const stop *stops, double pos, unsigned int spread, color4d *result)
{
const int PRECISION = 1<<16;
- int ipos = pos * PRECISION - 1;
+ int ipos = (pos + 0.05) * PRECISION - 1;
int i;
double frac;