Difference in arc rendering between cairo and skia

182 views
Skip to first unread message

Alexandre Bique

unread,
Mar 14, 2024, 8:56:08 AM3/14/24
to skia-discuss
Hi,

I've got two arc renderings, I'm not sure how to share them?

The first one is made with cairo and the second one with skia.
The cairo one's anti-aliasing seems to fades-out to black while the skia one fades out to transparancy.
Is there a setting to control this behavior in skia?
I think that cairo's approach feels sharper and stands out more, what's your thought?

Cheers,
Alex

Jim Van Verth

unread,
Mar 14, 2024, 9:05:28 AM3/14/24
to skia-d...@googlegroups.com
Can you attach the images to an email? It's hard to judge without something to look at.

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/c17a3b22-fb76-45f2-aa5b-e404959180d0n%40googlegroups.com.


--

Jim Van Verth |
 Software Engineer | Google.com

Alexandre Bique

unread,
Mar 14, 2024, 9:52:16 AM3/14/24
to skia-discuss
I could not attach the picture to the post, google group rejected id.

I've uploaded it here: https://we.tl/t-cyUrRfHDwP

After a discussion with my colleagues we think that skia is doing the right thing.

John Stiles

unread,
Mar 14, 2024, 12:01:29 PM3/14/24
to skia-d...@googlegroups.com
It looks like Skia is rendering as expected.
I'm not entirely sure why your Cairo image fades to a darker color when it's being antialiased, but that isn't how an antialiased edge should be rendered. Is it possible that you are drawing a "premultiplied-alpha" image as if it were "unpremultiplied-alpha"? That might explain the discrepancy. If these terms are unfamiliar to you, see https://nigeltao.github.io/blog/2022/premultiplied-alpha.html (which has some Cairo-specific info a few paragraphs in).

Reply all
Reply to author
Forward
0 new messages