Live data from Hacker News

WebKit switching to Skia for 2d graphics rendering

blogs.igalia.com

121–130 of 181 posts

Re: WebKit switching to Skia for 2d graphics rendering

#121

I was curious how Igalia was funded and this was a surprisingly good interview on how they’re structured, how they work with the major browser companies, etc… Apparently many Apple, Google, Firefox engineers left to work for them. https://thenewstack.io/igalia-the-open-source-powerhouse-you...

It's in my city. Their offices are just a small flat in in a pretty bland neighborhood. I guess most of them work remote.

82% remote :) (Not counting those that live in the city but are still WFH)

Re: WebKit switching to Skia for 2d graphics rendering

#122

Earlier quoted context omitted.

> I wish there was a nice and small vector graphics library with GPU acceleration. I'm personally skeptical about GPU acceleration being the answer to 2D rendering for various reasons. I'm looking forward to Blend2D https://blend2d.com/ > which is JIT based maturing and being the preferred solution.

What happened to Cairo the 2d graphics tool?

Some details in the article:

> There was an attempt at making Cairo support GPU rendering, which did not work particularly well due to the library being designed around stateful operation based upon the PostScript model—resulting in a convenient and familiar API, great output quality, but hard to retarget and with some particularly slow corner cases. Meanwhile, other web engines have moved more work to the GPU, including 2D rendering, where many operations are considerably faster.

Re: WebKit switching to Skia for 2d graphics rendering

#123

Skia is a great library, but as all things Google it's a pain to build. They don't use CMake and building it from source takes 20-30 minutes on a modern laptop. Furthermore, it's constantly changing its APIs and much of it is undocumented and unclear on how to use optimally. Most of the decisions taken by development team aren't discussed in the open and this makes it hard to understand the codebase. I wish there was…

> I wish there was a nice and small vector graphics library with GPU acceleration.

Check out nanovg: https://github.com/memononen/nanovg

Re: WebKit switching to Skia for 2d graphics rendering

#124
Couple things I've seen in this space looking around the past couple weeks...

Flutter made a different engine called Impeller[0] which is replacing Skia. Which is a bit surprising as an ignorant outsider. I hope that works out.

Rive (https://rive.app), is a new animation tool that targets multiple platforms including web and their CEO Guido Rosso gave a great interview on School of Motion[1] about how they are building an animation first vector engine. There is a side by side demo at 46:56[2] of Skia, Impeller and Rive.

0: https://docs.flutter.dev/perf/impeller

1: https://www.youtube.com/watch?v=U0Jd5-eStu4&t=2514s

2: https://youtu.be/U0Jd5-eStu4?si=8vv3c2bw3VumLzeu&t=2816

Re: WebKit switching to Skia for 2d graphics rendering

#126
post #106
post #61

Earlier quoted context omitted.

I have an open source project that uses Skia, and I just keep static libraries for all target platforms because the Skia build process is so painful. Maybe once a year I bite the bullet, do a new Skia build on all the platforms, and then I have to figure out how the C++ API has changed. At least that’s just rote work of fixing compiler errors by looking at the new header files. Even though it’s a pain in the ass, I s…

Out of curiosity, why do you rebuild? What kinds of new features would get you to want to upgrade?

The Skia C++ API changes quite a lot. If I didn't sync up regularly, the tech debt could become a problem down the line, for example if I want to add a platform that does need a new build of the library.

Re: WebKit switching to Skia for 2d graphics rendering

#128
post #116

Earlier quoted context omitted.

GPU support was removed from Cairo, because it was slower than CPU rendering and nobody wanted to maintain it.

Cairo's OpenGL support was removed, but I thought Cairo's X11 backend still has GPU acceleration for a few operations through XRender (depending on your video driver).

That's true, Cairo still provides XRender backend. Not sure it's that usable though as I think nobody really focuses on improving XRender, so it's probably in the same state as Cairo itself.

Re: WebKit switching to Skia for 2d graphics rendering

#129

Somewhat connected question, what is WPE? It’s something that got abstracted out of WebkitGTK, right? Is it a standalone port itself, or is it more like the framework to build a highly specialized one? I’ve seen at least in past versions that libwpe is an optional dependency of WebkitGTK, so they didn’t like abstract and then rebase it on the new component. Or is libwpe separate from WPE?

It's been a few years since I was looking into it, so this might be out of date. But WPE is targeted at kiosks and places you might want to display web content but not have a full web browser. Igalia can sell consulting services to these companies, as opposed to webkitgtk which has a small number of non-paying users. So WPE serves as a place for more active development of webkit-on-linux while not breaking webkitgtk which powers the web browser "Web" on gnome. Things from WPE tend to slowly make it into the webkitgtk build eventually. It's all maintained by the same people.

Looking at https://webkit.org/wpe/, the first design goal is the one that justifies WPE vs other webkit ports: "To provide a no-frills, straight to the point, web runtime for embedded devices."

The other goals, like standards compliant and hardware acceleration, are there to differentiate WPE from non-webkit and ancient-webkit browser engines that people might use on embedded devices.

Re: WebKit switching to Skia for 2d graphics rendering

#130
post #106
post #61

Earlier quoted context omitted.

I have an open source project that uses Skia, and I just keep static libraries for all target platforms because the Skia build process is so painful. Maybe once a year I bite the bullet, do a new Skia build on all the platforms, and then I have to figure out how the C++ API has changed. At least that’s just rote work of fixing compiler errors by looking at the new header files. Even though it’s a pain in the ass, I s…

Out of curiosity, why do you rebuild? What kinds of new features would get you to want to upgrade?

CVE-2023-2136 and friends are good reasons to upgrade.
Post reply on HN