Chromium like SVG Rendering in Skia?

369 views
Skip to first unread message

Ravi Arora

unread,
Jun 17, 2021, 12:35:25 PM6/17/21
to skia-discuss
Hi,
I would like to have a full fledged SVG renderer, for a SVG animation software, me and a friend are currently working. I was wondering if there is an easy way to render SVG's, exactly like rendered in Chrome. It seems to support a wide variety of features that I haven't seen being supported at other places, like pathLength, which is absolutely crucial for my software. The reason for coming to Skia is that I was aware that chromium backend utilises Skia for SVG. But when I tried the Skia demo application, it seemed like it didn't support pathLength. So I was wondering if there was another easy way to render, or I'd have to modify the SVG using my code for pathLength and then output to Skia to render in the desired manner?

Ryan Gonzalez

unread,
Jun 17, 2021, 12:42:13 PM6/17/21
to 'Mike Reed' via skia-discuss
I'm moderately sure Chrome's SVG rendering is primarily handled by Blink and just uses Skia as a drawing backend.
On Jun 17, 2021, 11:35 AM -0500, Ravi Arora <yugi...@gmail.com>, wrote:
Hi,
I would like to have a full fledged SVG renderer, for a SVG animation software, me and a friend are currently working. I was wondering if there is an easy way to render SVG's, exactly like rendered in Chrome. It seems to support a wide variety of features that I haven't seen being supported at other places, like pathLength, which is absolutely crucial for my software. The reason for coming to Skia is that I was aware that chromium backend utilises Skia for SVG. But when I tried the Skia demo application, it seemed like it didn't support pathLength. So I was wondering if there was another easy way to render, or I'd have to modify the SVG using my code for pathLength and then output to Skia to render in the desired manner?  --
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/576eb8ea-23bf-4ae3-a1a8-029bc0bd3e25n%40googlegroups.com.

Mike Reed

unread,
Jun 17, 2021, 12:50:19 PM6/17/21
to skia-d...@googlegroups.com
Quite true. Chrome has their own parser/dom for SVG, and uses Skia just for the actual drawing part.

Skia has its own (smaller, lighter, less-complete) SVG parser and DOM. It is not used by Chrome, but is used by other folks. If you want to request a feature or report a bug, please do (via https://skbug.com)



Reply all
Reply to author
Forward
0 new messages