On Mon, 2017-05-01 at 00:25 +0200, Marc Jeanmougin wrote:
Easiest way to remove the banding on gradients would be to have dithering in pixman (used by cairo).
Agreed
See also earlier discussion in [1]
You can find some traces of people having done that (even in old mozilla code[2] with a custom pixman patch[3])
From looking at the pixman repo[4], it does not seem there has been
This is dithering from 8 bit per channel to 5/6/5 bits per channel.
anything done to do it there. I did not investigate the pixman ml to find if there has been discussions about dithering there.
I looked into this some time ago. The biggest problem is that pixman does not support greater than 32 bit color. One would want to generate the gradient at, say 10 bit per channel color and then dither to 8 bit per channel (which including alpha means a minimum of 40 bit color).
BTW, Nvidia has an custom extension to OpenGL that can render SVG without all these problems but they can't get others interested.
https://developer.nvidia.com/nv-path-rendering
Tav