We have this sort of code in a bunch of places:
alpha = min(alpha, do_clip());
I'm surprised by this. Isn't applying a mask usually done by multiplying the alphas? If you use min(), aren't you going to lose some of the anti-aliasing of the shape if you apply the clip to something that's, say, only 10% opaque?
I don't think there's a specific reason. @kvark ? What does Gecko / Skia currently do - just multiply the alphas together or something more complicated?
IIRC, we had a few cases in mind when picking min but we should definitely just go with Gecko/Skia instead of it's different.
@jrmuizel says: "Skia uses a multiplication. Minimums aren't ever used."
Sounds good - updated the issue title to reflect what we want to do.
Taking.
Most helpful comment
https://www.cairographics.org/operators/#clipmask