Siarhei Siamashka <[email protected]> writes: > +/* A variant of 'over', which works faster for non-additive blending on the > + * platforms which do not have special instructions for saturated addition > + */ > +static force_inline uint32_t > +over_a (uint32_t src, uint32_t dest, pixman_bool_t additive_blending) > +{ > + uint32_t a = ~src >> 24; > + if (additive_blending) > + { > + UN8x4_MUL_UN8_ADD_UN8x4 (dest, a, src); > + return dest; > + } > + else > + { > + UN8x4_MUL_UN8 (dest, a); > + return dest + src; > + } > +}
Is there any reason to not just add a boolean "additive_blending" to the existing force_inline over() function? It might also be interesting to add the check as a new NOT_SUPER_LUMINESCENT flag and then simply require it for the source for all the over_n_*() functions. That would allow similar optimizations for the n_8_565 case and probably the n_8888_8888_ca() case as well. The flag could be set for all the gradients and any time an image is opaque. Soren _______________________________________________ Pixman mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pixman
