WebKit switching to Skia for 2d graphics rendering
WebKit’s GTK and WPE ports are replacing the Cairo graphics library with Google’s Skia engine for 2D rendering, aiming for major performance gains and better GPU utilization on Linux and embedded devices. Commenters note that this shift does not affect Apple’s Safari, which continues to use Core Graphics, and highlight Igalia’s central role in maintaining these non-Apple WebKit ports. The move sparks broader comparisons between Skia and alternatives like Blend2D, Vello, and Flutter’s Impeller, raising tradeoff questions around build complexity, API stability, licensing, and long-term maintenance.
Scope of the Skia migration
- Change applies to the WebKitGTK and WPEWebKit ports, not Apple’s macOS/iOS WebKit.
- Article title was later clarified; commenters repeatedly stress this is not Safari.
- WPE targets embedded / kiosk-style devices; WebKitGTK powers GNOME’s browser and some app webviews.
Motivation and perceived benefits
- Current stack for these ports is Cairo + CPU-centric architecture.
- Internal tests with Skia on desktop doubled MotionMark scores even before serious optimization.
- Commenters expect better performance and a more modern GPU-accelerated pipeline.
- Some are happy that Skia uses a BSD-style license compatible with GPL.
Cairo’s limitations
- Cairo is described as effectively maintenance-only with few active developers.
- GPU backends (e.g., OpenGL) were removed because they underperformed and lacked maintainers.
- Architecture modeled on PostScript: good quality and simple API, but hard to retarget to GPUs and has slow corner cases.
- Many projects are moving away from Cairo or out of its fast path.
Skia’s strengths and ecosystem
- Widely used: Chrome, Android, Firefox Canvas, Flutter (historically), .NET, JetBrains UI, various graphics tools and frameworks.
- API model: queue drawing commands, optimize, then render tiles or regions efficiently.
- Gives some projects a strong guarantee of “renders like Chrome.”
Concerns: build, API stability, and C interface
- Multiple reports that Skia is hard to build: custom tools, heavy dependencies, changing requirements, slow or fragile builds.
- Others say current Bazel/GN builds are quick if instructions are followed.
- Complaints about constantly changing C++ APIs and removal of a prior C API attempt.
- Some wish WebKit would expose or help stabilize a C API; others argue Skia should remain an internal implementation detail.
Alternatives and broader 2D landscape
- Mentioned alternatives: Blend2D, AGG, NanoVG, Vello, thorvg, BGFX, The-Forge, AmanithVG/SVG, Qt’s QPainter and GSK, Impeller, custom engines.
- Blend2D’s author argues for fast CPU-only rendering with a stable C ABI as a Cairo/AGG successor.
- Some are skeptical that GPU is always the right answer for 2D; others stress GPU is now standard in browsers.