[cairo] pixman regression

Mike Shaver mike.shaver at gmail.com
Fri Mar 7 10:44:38 PST 2008


On 07 Mar 2008 19:37:35 +0100, Soeren Sandmann <sandmann at daimi.au.dk> wrote:
> "Robert O'Callahan" <robert at ocallahan.org> writes:
>
>  > On 07 Mar 2008 06:06:21 +0100, Soeren Sandmann <sandmann at daimi.au.dk> wrote:
>  > +       v.vector[0] -= (pixman_fixed_e * v.vector[2]) >> 16;
>  > +       v.vector[1] -= (pixman_fixed_e * v.vector[2]) >> 16;
>  > +       unit.vector[0] -= (pixman_fixed_e * unit.vector[2]) >> 16;
>  > +       unit.vector[0] -= (pixman_fixed_e * unit.vector[2]) >> 16;
>  >
>  > Shouldn't the last line be "unit.vector[1]"? Also, I'd put the common
>  > subexpression in a local variable but maybe that's just me.
>
>  Good catch, thanks. This piece of code is not particularly time
>  critical, so I'll just leave the subexpressions in place.

I think Robert was probably referring to the ease of reading it. You
don't have to read each line very carefully to find out that they're
the same, or see where they aren't, and you can get some helpful
labelling from the variable name.

Mike


More information about the cairo mailing list