pixman-combine32: Make Color Dodge routine follow the math more closely
authorSøren Sandmann Pedersen <ssp@redhat.com>
Fri, 4 Oct 2013 20:40:17 +0000 (16:40 -0400)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Sat, 12 Oct 2013 19:04:27 +0000 (15:04 -0400)
commit105fa74faddcb83e7779c035f8c41ec4924acfd8
treef49c316ea46e9cd2b9420348003cb905ea7cc032
parent2527a72432adcaa9752a9138272d53063ee7484f
pixman-combine32: Make Color Dodge routine follow the math more closely

Change blend_color_dodge() to follow the math in the comment more
closely.

Note, the new code here is in some sense worse than the old code
because it can now underflow the unsigned variables when the source is
superluminescent and (as - s) is therefore negative. The old code was
careful to clamp to 0.

But for superluminescent variables we really need the ability for the
blend function to become negative, and so the solution the underflow
problem is to just use signed variables. The use of unsigned variables
is a general problem in all of the blend mode code that will have to
be solved later.

The CRC32 values in thread-test and blitters-test are updated to
account for the changes in output.
pixman/pixman-combine32.c
test/blitters-test.c
test/thread-test.c