-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
blog: add a post about the 2.46 release
This was co-authored with Adrián Pérez but I don't see a way to add co-authors to the blog.
- Loading branch information
Showing
1 changed file
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
--- | ||
title: "WPE WebKit 2.46 highlights" | ||
author: csaavedra | ||
permalink: /blog/2024-wpewebkit-2.46.html | ||
preview: A review of the most significant changes coming in WPE WebKit 2.46. | ||
thumbnail: /assets/img/logo-black.svg | ||
--- | ||
|
||
A couple of weeks ago, the WPE WebKit team released version 2.46. This is an important milestone for the project as, for the first time in a stable series, the Skia backend takes over rendering. Skia brings significant improvements to the graphics stack, so we are very happy for this release. The list of changes goes beyond graphics, and it's not short of awesome, so let's have a look to what's new! | ||
|
||
### Cairo is out, Skia is in | ||
|
||
We [announced][skia-wk-announce] some time ago that a new rendering backend with [Skia](https://skia.org) was on the works and that it would eventually replace Cairo. 2.46 the first release series where Skia is used, bringing important improvements in rendering and performance. | ||
|
||
While Skia can use a GPU for rendering, our testing with common embedded SoCs has shown that the way WebKit works may result in slightly worse performance in some cases than letting Skia use the CPU. Hence, for the 2.46 releases the latter is the default, while development continues to improve GPU usage on low-powered devices with the ultimate goal of making accelerated rendering the default choice in all cases. | ||
|
||
The Cairo backend is still present and will be selected automatically at build time for big-endian architectures, where Skia is not yet supported. We plan to remove support for Cairo in the near future, and this approach allows us to ship the new renderer while solving the remaining issues. At any rate, the Cairo renderer is no longer receiving active development. | ||
|
||
It is important to notice that it is recommended to build WPE with Clang instead of GCC. This comes from upstream Skia; see their [supported and preferred compilers page][skia-compilers] for details. | ||
|
||
[skia-wk-announce]: https://blogs.igalia.com/carlosgc/2024/02/19/webkit-switching-to-skia-for-2d-graphics-rendering/ | ||
[skia-compilers]: https://skia.org/docs/user/build/#supported-and-preferred-compilers | ||
|
||
### Graphics stack revamped | ||
|
||
Tha switch to Skia has made possible a significant number of changes and improvements in the WebKit graphics stack. These changes relate to accelerated canvas, accelerated CSS filters, color spaces, and more. [Carlos García has written extensively about these changes][cgarcia-2.46-gfx] in his blog, we recommend reading his article for more details. | ||
|
||
[cgarcia-2.46-gfx]: https://blogs.igalia.com/carlosgc/2024/09/27/graphics-improvements-in-webkitgtk-and-wpewebkit-2-46/ | ||
|
||
### Trace point profiling with sysprof | ||
|
||
Sysprof is a profiling and performance analysis tool for Linux. Thanks to integration with `libsysprof-capture`, it is now possible to use Sysprof to record trace points to do profiling and performance analysis of WebKit internals. This is a major improvement that will allow us to more effectively analyze the code paths that are more performance-sensitive and find ways to optimize them. It will also allow vendors to profile their specific hardware configurations and specific use-cases as well. | ||
|
||
For a more in-depth presentation of the integration with Sysprof, please read [Georges Stavacras' blog post on the topic](https://feaneron.com/2024/07/12/profiling-a-web-engine/). | ||
|
||
### API changes | ||
|
||
#### Additions | ||
|
||
- [`webkit_settings_apply_from_key_file()`](https://webkitgtk.org/reference/webkitgtk/unstable/method.Settings.apply_from_key_file.html) allows applying WebKit settings directly from a key file | ||
- The console message API, which had been previously deprecated, has been brought to the current API | ||
- [`WebKitAutomationSession::will-close`](https://webkitgtk.org/reference/webkitgtk/2.46.0/signal.AutomationSession.will-close.html) signal, which allows clients to perform cleanup tasks before an automation session is closed | ||
- [`enable-2d-canvas-acceleration`](https://webkitgtk.org/reference/webkitgtk/2.46.0/property.Settings.enable-2d-canvas-acceleration.html) WebSetting can be used to control 2D-canvas acceleration in Skia-enabled builds | ||
- `webkit_web_view_toggle_inspector()` shows or hides the web inspector for a given webview (only available with the WPE platform API) | ||
|
||
#### Deprecations | ||
|
||
- `WebKitWebView::insecure-content-detected` signal. | ||
- `WebKitWebContext:use-system-appearance-for-scrollbars` property. | ||
- `webkit_web_context_set_use_system_appearance_for_scrollbars()` and `webkit_web_context_get_use_system_appearance_for_scrollbars()`. | ||
|
||
### GStreamer customizations | ||
|
||
Compile-time platform-specific GStreamer customizations are now done at runtime, using the `WEBKIT_GST_QUIRKS` and `WEBKIT_GST_HOLE_PUNCH_QUIRK` environment variables. Setting their value to `help` will return a help message with the possible values to `stderr`. A list of the removed CMake defines: | ||
|
||
- `USE_GSTREAMER_NATIVE_VIDEO` | ||
- `USE_GSTREAMER_NATIVE_AUDIO` | ||
- `USE_GSTREAMER_TEXT_SINK` | ||
- `USE_GSTREAMER_HOLEPUNCH` | ||
- `USE_WPEWEBKIT_PLATFORM_WESTEROS` | ||
- `USE_WPEWEBKIT_PLATFORM_BCM_NEXUS` | ||
- `USE_WPEWEBKIT_PLATFORM_AMLOGIC` | ||
- `USE_WPEWEBKIT_PLATFORM_RPI` | ||
- `USE_WPEWEBKIT_PLATFORM_BROADCOM` | ||
- `USE_WESTEROS_SINK` | ||
|
||
### Web Platform changes | ||
|
||
The changes to supported Web Platform features between releases of WebKit are always substantial, and for that reason listing all of those changes here would be a major endeavour. The following is an incomplete list of some of the features that have been enabled, removed, and marked in preview state since 2.44, in no particular order: | ||
|
||
* CSS Container/Style Queries | ||
* CSS `text-wrap-style` | ||
* CSS `background-clip: border-area` | ||
* CSS `text-underline-position: left|right` | ||
* CSS `scrollbar-width` | ||
* CSS View Transitions | ||
* CSS Grid Masonry layout (preview) | ||
* CSS `::target-text` pseudo element | ||
* WebCrypto X25519 algorithm (preview) | ||
* AppCache support has been removed | ||
* New `Promise.try()` method | ||
* New `Observable` methods, like `.map()` and `.filter()` | ||
|
||
### Other noteworthy changes | ||
|
||
* Suport for the WebP image format is now always enabled. | ||
* WebDriver clients may now connect to an already running process, instead of always needing to spawn a new one. | ||
* The `gst-libav` AAC decoders are now disabled due to outstanding bugs. Distributors are encouraged to use the GStreamer FDK AAC decoder (part of `gst-plugins-bad`) instead. | ||
|
||
### And much more! | ||
|
||
WebKit evolves and changes a lot between major stable releases. Listing all changes would not be possible. There are countless bug fixes, performance improvements, new web features supported, and so on. We recommend checking the [release notes](https://wpewebkit.org/release/) and the git log for more details. | ||
|
||
The WPE WebKit team is already working on the 2.48 release, schedule for early next year. Until then! | ||
|