Use sentinels instead of special casing first and last stops
authorSøren Sandmann Pedersen <ssp@redhat.com>
Fri, 14 Oct 2011 13:02:14 +0000 (09:02 -0400)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Sat, 15 Oct 2011 14:50:20 +0000 (10:50 -0400)
commit2d0da8ab8d8fef60ed1bbb9d6b75f66577c3f85d
tree11a5ce95bd57ee8f7102d5c7c038745342d2ea85
parent84d6ca7c891601b019d4862a556ed98b7e6fe525
Use sentinels instead of special casing first and last stops

When storing the gradient stops internally, allocate two more stops,
one before the beginning of the stop list and one after the
end. Initialize those stops based on the repeat property of the
gradient.

This allows gradient_walker_reset() to be simplified because it can
now simply pick the two closest stops to the position without special
casing the first and last stops.
pixman/pixman-gradient-walker.c
pixman/pixman-image.c