May 08, 2019
CEF (Chromium Embedded Framework) provides a simple framework for embedded browser/web functionality in your application. It is built on top of Chromium and mitigates the issue of a fast-changing Chromium API with stable APIs.
Over the past few years, Collabora has been involved in a number of customer projects to port/embed CEF on their platforms. One of the major projects related to this was to port CEF on Wayland.
To give some background (see previous blog), Chromium supports multiple backends with its Ozone layer abstraction. Once Chromium is built with Ozone enabled, a specific backend (e.g Wayland, Headless, X11) can be chosen at runtime.
Some time ago, Chromium made the decision to move to a servicification of UI-related components and introduced Mus (mandoline UI service). Ozone was only functional with the Mus framework, and not with the default Aura framework.
The work therefore involved updating CEF to use Mus and use Ozone-enabled Chromium for Wayland support. After quite a bit of effort, with several Collaborans participating, patches were made available for CEF to enable its usage on Wayland. And as our goal was always to upstream these changes to CEF, we began making these patches upstream ready.
However, at that time, building mainline CEF for Wayland still required external patches to be available on the ozone-wayland-dev project. This caused some issues for the patches getting accepted by upstream.
But time passed and the Chromium project changed its mind and deprecated Mus, moving back to its original architecture which allowed Ozone to be functional with the default Aura framework. This simplified everything, and enabled the Chromium main tree to be directly built for Ozone/Wayland.
This also led to some simplification of the patch for the CEF Ozone build and after a successful team effort, the patch has finally landed upstream!
Now that the patch is directly available upstream, CEF is ready to be built with different Ozone platforms (Wayland, X11, Headless).
There are still some constraints to use CEF for Ozone due to many parts of the code dependant on X11.
The CEF Ozone build binary distribution can be created by passing flag
Here are build instructions to build/run CEF on Wayland:
$ export GN_DEFINES="use_ozone=true" $ cd /path/to/chromium/src/cef $ ./cef_create_projects.sh $ cd /path/to/chromium/src $ ninja -C out/Release_GN_x64 cefsimple $ weston & $ ./out/Release_GN_x64/cefsimple --use-views --ozone-platform=wayland
This summer, Christoph Haag and I had the pleasure of taking part in Google Summer of Code as mentors for xrdesktop, the Open Source project…
Earlier this year, from January to April 2021, I worked on adding support for stateless decoders for GStreamer as part of a multimedia internship…
In our previous post, we presented a project backed by INVEST-AI which introduces a multi-stage neural network-based solution. Now let's…
Initiated as a joint effort by the Google Chrome OS team and Collabora, the recent KernelCI hackfest brought the addition of new tests including…
There's a lot that has happened in the world of Zink since my last update, so let's see if I can bring you up to date on the most important…
Panfrost, the open source driver for Arm Mali, now supports OpenGL ES 3.1 on both Midgard (Mali T760 and newer) and Bifrost (Mali G31, G52,…