[cairo] Optimizing operators for opaque patterns
cairo at antoineazar.com
Thu Jan 31 17:24:06 PST 2008
in the case of an opaque source, I've optimized cairo to use a SOURCE
operator instead of OVER. Mathematically this is exactly equivalent.
This for example accelerates enormously paint operations in Pixman. A
quick test showed a 3x boost in speed.
I'm currently doing the check for an opaque source pattern in the
gstate functions, as this is the first place at which we propagate
the desired operator to the rest of Cairo. The gstate's operator of
course stays unchanged, we're just sending SOURCE instead of OVER.
Let me know if there's a better place for that optimization.
Also, I'm optimizing other composition operators inside Pixman. Each
operator's composition function can be accelerated if SRC_A and/or
DST_A is opaque. Other backends should do this if it's not already done.
More information about the cairo