WebKit is transitioning to the use of the Skia library for 2D graphics rendering.

The browser engine WebKit, developed by Apple and used in browsers like Safari and Epiphany (GNOME Web), is switching to using the Skia library for 2D graphics rendering, which is utilized in Google Chrome, ChromeOS, Android, and Flutter, and supports GPU rendering. The porting was conducted by Igalia as part of an initiative to optimize WebKitGTK performance for GNOME. The reason for the migration is cited as reaching the performance optimization limit for 2D rendering using the CPU, necessitating the involvement of the GPU for further performance enhancements.

Attempts to add GPU rendering capabilities to the Cairo library, which was used in WebKit, were unsuccessful due to the architectural limitations of this library. Additionally, the project to write a custom rendering library was abandoned due to the difficulty of achieving a balance between performance and rendering quality. Consequently, developers from Igalia returned to the idea of using the Skia library, which was the optimal solution but was initially rejected due to the lack of a stable API, issues with it being an external dependency, and the need to maintain a third-party module in WebKit.

The decision to transition WebKit to the Skia library was influenced by the drawbacks associated with replacing dependencies that outweighed the benefits, which were not only about improved rendering performance but also simplifying the codebase and expanding prospects for developing new functionalities. Regarding performance, the initial port of WebKit to Skia, during MotionMark tests on PCs, showed a rendering acceleration of two times compared to the old CPU-based code.

In February 2024, the WebKit branch transitioned to Skia reached readiness for merging into the main WebKit codebase. After discussions with developers from Google, Sony, Apple, and Red Hat, the decision was made to shift WebKit from the Cairo library to Skia, and the code for supporting Skia has now been integrated into the main branch of WebKit.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster