Live data from Hacker News

WebKit switching to Skia for 2d graphics rendering

blogs.igalia.com

111–120 of 181 posts

Re: WebKit switching to Skia for 2d graphics rendering

#111
post #2

"WebKit Switching to Skia for 2D Graphics Rendering" ... for the GTK and WPE ports. Not on Apple platforms.

Oh. I thought all web browsers were on Skia now. I guess the Apple platform is CoreGraphics and GTK was Cairo? (Edit: Read the article. Yes)

WebKit on Apple platforms uses Core Graphics and Core Animation, yes.

Re: WebKit switching to Skia for 2d graphics rendering

#112
post #88

I wish WebKit GTK was more performant in general (and also in the MDN compatibility list but its another topic). It is getting better but it really is a blocker on shipping quality application with Tauri on Linux. There is a reason most apps using native webviews only target macos and windows, WebKit GfK is mostly undocumented for frontend engineers and often very much outdated / not installed on end user machines.

Adding to this wishlist, if it were available on Windows then it would be an option for a cross-platform webview widget, but it hasn’t supported it for a while now.

Re: WebKit switching to Skia for 2d graphics rendering

#113

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. 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.

Thanks! I'm doing what I can to make Blend2D even faster. It's been really exciting project to work on and I have big plans with this library.

Re: WebKit switching to Skia for 2d graphics rendering

#114
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?

Re: WebKit switching to Skia for 2d graphics rendering

#115

Earlier quoted context omitted.

I believe Impeller is even worse with regards to all the issues mentioned in the parent comment. In particular since it is so tight to Flutter.

I get the point about it being developed with one primary objective - but perhaps a naive question here - in the end isn't that primary objective a shared one - to render text, lines, curves and images as fast as possible, via some sort of higher level API? And to do so onto multiple OS & hardware backends?

Skia relies heavily on runtime shader compilation, which is slow and causes frame jank but improves peak performance. Skia also supports much older devices than Flutter does.

There’s no free lunch, Impeller has a different set of trade offs that are a better fit for Flutter.

Re: WebKit switching to Skia for 2d graphics rendering

#116

Earlier quoted context omitted.

Can it be GPU accelerated? (Is that even a dumb question to ask?)

Cairo has only limited support for GPU acceleration and hasn't seen much development this decade. So users who care about performance have either switched away from Cairo entirely or are at least reducing its usage and are taking it out of the fast path.

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

Re: WebKit switching to Skia for 2d graphics rendering

#117
post #61

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 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…

Have you considered Blend2D? It's much easier to build, and performance is on par with Skia.

Re: WebKit switching to Skia for 2d graphics rendering

#118

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…

This.

We use it in LibreOffice, but its a right pain to update versions and debugging it is.... challenging.

The upside is that the Google Skia team is super friendly and willing to help.

Re: WebKit switching to Skia for 2d graphics rendering

#119

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?

Cairo is in a maintenance-only mode. Nobody develops this library anymore and it only has a maintainer or two. Since nobody really worked on Cairo in the past 15 years it's not optimized for modern hardware.

You can see some existing benchmarks here:

  - https://blend2d.com/performance.html
Both the benchmarking tool and Blend2D are open-source projects so anyone can verify the numbers presented are indeed correct, and anyone can review/improve the backend-specific code that is used by the benchmarking tool.

Re: WebKit switching to Skia for 2d graphics rendering

#120
post #116

Earlier quoted context omitted.

Cairo has only limited support for GPU acceleration and hasn't seen much development this decade. So users who care about performance have either switched away from Cairo entirely or are at least reducing its usage and are taking it out of the fast path.

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).
Post reply on HN