pixman-gradient-walker: Make left_x and right_x 64 bit variables
authorSøren Sandmann Pedersen <ssp@redhat.com>
Thu, 24 Apr 2014 00:25:40 +0000 (20:25 -0400)
committerSøren Sandmann <ssp@redhat.com>
Thu, 15 May 2014 17:29:58 +0000 (13:29 -0400)
commit9cd283b2eb8279824406bfd47b020d21fc00cf82
tree0b23ee8371b5b98f013820f724d17302a2605fd6
parentf5f5dbbbc668a3a90c6cfc79bbd2422805db31e7
pixman-gradient-walker: Make left_x and right_x 64 bit variables

The variables left_x, and right_x in gradient_walker_reset() are
computed from pos, which is a 64 bit quantity, so to avoid overflows,
these variables must be 64 bit as well.

Similarly, the left_x and right_x that are stored in
pixman_gradient_walker_t need to be 64 bit as well; otherwise,
pixman_gradient_walker_pixel() will call reset too often.

This fixes the radial-invalid test, which was generating 'invalid'
floating point exceptions when the overflows caused color values to be
outside of [0, 255].
pixman/pixman-gradient-walker.c
pixman/pixman-private.h