pixman-combine32.c: Fix bugs related to integer promotion
authorSøren Sandmann Pedersen <ssp@redhat.com>
Fri, 18 Oct 2013 20:39:38 +0000 (16:39 -0400)
committerSøren Sandmann <ssp@redhat.com>
Sat, 4 Jan 2014 21:13:27 +0000 (16:13 -0500)
commit89662adf77c69c3f71ded9cd8818ac5626b68451
tree9aac45c00cebef6154e556e55dcfe51009ce472d
parente7a99b3b0f605d3f9937bc79e4385c6b71df7845
pixman-combine32.c: Fix bugs related to integer promotion

In the component alpha part of the PDF_SEPARABLE_BLEND_MODE macro, the
expression ~RED_8 (m) is used. Because RED_8(m) gets promoted to int
before ~ is applied, the whole expression typically becomes some
negative value rather than (255 - RED_8(m)) as desired.

Fix this by using unsigned temporary variables.

This reduces the number of failures in pixel-test to 363.
pixman/pixman-combine32.c
test/blitters-test.c