[Pixman] [cairo] issue with blend modes in pixman

Rik Cabanier cabanier at gmail.com
Sun Jan 6 19:41:41 PST 2013


On Sat, Jan 5, 2013 at 11:07 PM, Adrian Johnson <ajohnson at redneon.com>wrote:

> On 01/01/13 07:35, Rik Cabanier wrote:
> > Some of the blend modes are not producing correct results.
> > You can find a diff with the incorrect results
> > here: https://bugs.webkit.org/show_bug.cgi?id=105074
> >
> > Looking at the formulas, I can see what's wrong but I don't know who to
> > contact.
>
> Could you tell us what specifically is wrong with the formula?
>

I was actually seeing bugs with blending in Core Graphics and not in pixman.
I got pulled away from looking at blending in cairo. Hopefully, I will get
back to it later this week.



>
> The webkit bug suggests there is a difference between the SVG and PDF
> formulas. At the time the blend modes were added to pixman the formulas
> were based on the PDF specification and the SVG working group said the
> SVG formulas should match PDF [1]. Are the PDF formulas wrong? Or do we
> need CAIRO_OPERATOR_COLOR_BURN and CAIRO_OPERATOR_COLOR_BURN_SVG if we
> are to support both PDF and SVG renderers?
>

No, the SVG operators should match the PDF ones. It would be a mistake to
have 2 different formulas for the same blend mode.
The confusing part if that the PDF (and CSS) blend modes are done in
non-premultiplied space and produce a color before you composite.


>
> [1] http://lists.cairographics.org/archives/cairo/2008-October/015362.html
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pixman/attachments/20130106/a995195c/attachment.html>


More information about the Pixman mailing list