WebKitGTK Moving To Skia For 2D Rendering To Yield Better Performance

Written by Michael Larabel in GNOME on 21 February 2024 at 10:06 AM EST. 16 Comments
GNOME
WebKitGTK as the port of the WebKit rendering engine used by GNOME Web (Epipahny) and other software for displaying web content is transitioning to using Skia for its 2D rendering.

The open-source Skia graphics engine developed by Google allows GPU-accelerated rendering via ANGLE and Vulkan. CPU software rasterization, and more. Skia is used by Google Chrome, Mozilla Firefox, and countless other software for 2D graphics while now WebKitGTK and WPEWebKit are transitioning to it too.

Carlos Garcia Campos with Igalia wrote a blog post this week outlining these open-source projects switching to Skia for 2D graphics rendering. Much effort has been spent in trying to optimize WebKitGTK/WPEWebKit performance while ultimately they've found that using Skia is their best route forward for better performance.

Skia logo


Carlos Garcia Campos explained:
"In December 2023 we made the decision of giving Skia a try internally and see if it would be worth the effort of maintaining the project as a third party module inside WebKit. In just one month we had implemented enough features to be able to run all MotionMark tests. The results in the desktop were quite impressive, getting double the score of MotionMark global result. We still had to do more tests in embedded devices which are the actual target of WPE, but it was clear that, at least in the desktop, with this very initial implementation that was not even optimized (we kept our current architecture that is optimized for CPU rendering) we got much better results.
...
In February 2024 we reached a point in which our Skia internal branch was in an “upstreamable” state, so there was no reason to continue working privately. We met with several teams from Google, Sony, Apple and Red Hat to discuss with them about our intention to switch from Cairo to Skia, upstreaming what we had as soon as possible. We got really positive feedback from all of them, so we sent an email to the WebKit developers mailing list to make it public. And again we only got positive feedback, so we started to prepare the patches to import Skia into WebKit, add the CMake integration and the initial Skia implementation for the WPE port that already landed in main.

We will continue working on the Skia implementation in upstream WebKit, and we also have plans to change our architecture to better support the GPU rendering case in a more efficient way. We don’t have a deadline, it will be ready when we have implemented everything currently supported by Cairo, we don’t plan to switch with regressions. We are focused on the WPE port for now, but at some point we will start working on GTK too and other ports using cairo will eventually start getting Skia support as well."

Learn more about Skia for WebKitGTK/WPEWebKit via the Igalia blog post.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week