Chrome moved to use the Ozone layer on X11 systems

Google Chrome

Some days ago Chrome sent all users of the stable branch of the browser a change which, by default, activates a new code to organize the output on systems with an X server, based on the use of a layer called «Ozone» that abstracts the interaction with the graphical subsystem.

Using Ozone allows to provide support for X11 and Wayland in the same Chrome build, without being tied to a specific graphics subsystem.

About Ozone

Ozone is a platform abstraction layer below the Aura window system which is used for input and low-level graphics, thereby the abstraction supports underlying systems ranging from built-in SoC targets to new alternative windowing systems to X11 on Linux like Wayland or Mir to display Aura Chromium by providing an interface implementation of the platform.

Since it is desired that Chrome be used in a wide variety of projects, work is being done to facilitate migration to new platforms.

To support this goal, Ozone follows the following principles:

  • Interfaces, not ifdefs: Differences between platforms are handled by calling a platform-provided object through an interface instead of using conditional compilation. The internal components of the platform remain encapsulated and the public interface acts as a firewall between the neutral upper layers of the platform (aura, flicker, content, etc.) and the lower platform specific layers.
  • Flexible interfaces: Platform interfaces should encapsulate exactly what Chrome needs from the platform, with minimal restrictions on platform implementation, as well as minimal restrictions on the use of the upper layers.
  • Runtime for all platforms: to avoid conditional compilation in the upper layers it allows us to build multiple platforms in a binary and link them at runtime.
  • Simple branching – Many ports start out as forks and many of them later merge their code upstream, others will have a long lifespan outside the tree. This is fine, and we should facilitate this process to encourage forks.

It is because of that the independence of the peculiarities of building a graphical interface on various systems operating in Chrome it is implemented using its own Aura cross-platform graphics stack. Aura acts as a window manager (Aura shell), running through its own composite server and using available GPU tools to speed up graphical operations.

To generate interface elements, the Aura UI graphics toolkit is used, which provides its own set of widgets, dialogs, controls, and event handlers. Of the underlying graphics stack capabilities (X11, Wayland, Cocoa, or Windows), only the output at the top of the root window is used.

All specific operations with the Linux graphics stack are reduced to one layer easily replaceable abstract ozone. So far, Ozone support has been provided in the form of an option and the default is the old, X11-encoded backend.

Work on translating X11 builds to use the Ozone layer has been underway since 2020 and for users, the gradual inclusion of the Ozone / X11 backend by default started with the release of Chrome 92.

That is, a few days ago, the new backend was activated for all Chrome Linux users. In addition to X11 and Wayland (“–ozone-platform = wayland” and “–ozone-platform = x11”), Ozone also develops platforms for output through KMS / DRM graphics drivers, ASCII graphics output using the libcaca library, rendering to PNG images (headless) and streaming via Chromecast devices.

Finally, it is mentioned that the above backend is planned, which only supports work only through X11, will be deprecated and eventually removed from the codebase (After the new Ozone / X11 backend reached parity in functionality and enabled it by default, there was no point in keeping another X11 backend in the browser.)


Add Comment