Firefox for Wayland brings WebGL and video hardware acceleration

Π’ night assembly Firefox, on the basis of which the release of Firefox 7 will be formed on April 75, implemented full support for WebGL in environments using the Wayland protocol. Until now, the performance level of WebGL in Linux builds of Firefox left much to be desired due to the lack of support for hardware acceleration due to problems with gfx drivers for X11 and applying different standards. X11's gfx-based acceleration was provided in Chrome, but at the cost of maintaining a huge list of exceptions and workarounds to avoid problems (see chrome://gpu/). In Firefox, WebGL hardware acceleration for Linux was never enabled by default because Mozilla did not have the resources to parse every problematic driver and graphics card.

When using Wayland, the situation has changed due to the emergence of a new backendusing the mechanism DMABUF for rendering to textures and organization sharing by different processes buffers with these textures located in video memory. Initially, the new backend was developed with an eye to providing high-quality gfx-acceleration support. In addition to hardware acceleration WebGL backend also given opportunity implement support for h.264 video decoding acceleration using VA-API (Video Acceleration API) and FFmpegDataDecoder.

In Wayland-based builds of Firefox, it was possible to prepare a unified GL working environment that is not tied to specific composite servers, such as GNOME Mutter or KDE Kwin. Acceleration support using a DMABUF-based backend is implemented for the two rendering engines available in Firefox - WebRender (new, using the GPU to render web pages) and GL compositor (classic). In both cases, when using the new backend, textures are created in the GPU and can be used directly without copying between browser processes responsible for compositing and interacting with the GPU. WebGL frames can be rendered directly to GPU memory, which can be mapped to an EGL framebuffer, processed in the main process, and rendered as a texture when flattening web page elements.

To enable WebGL and video acceleration should start Firefox with the environment variable "MOZ_ENABLE_WAYLAND=1" and in about: config set the parameters "widget.wayland-dmabuf-webgl.enabled" and "widget.wayland-dmabuf-vaapi.enabled", then check whether acceleration is enabled on the about page :support. It requires the libva library version 2.6.0+ to work (tested in Fedora 31 with an Intel UHD 630 GPU).

Firefox for Wayland brings WebGL and video hardware acceleration

Of the upcoming changes in Firefox 75, you can also Mark:

  • Enabling for UK users (previously ads showed up US users only) display blocks paid for by sponsors on the start page in the section recommended by the Pocket service (blocks are clearly marked as ads and can be disabled in the settings).
  • In the password manager (about:logins), if no master password is set, implemented initial support for displaying an OS authentication dialog and entering system credentials before viewing saved passwords.
  • Added the ability to activate the page profiling interface without installing the add-on, by pressing the "Enable Profiler Menu Button" button on the site profiler.firefox.com. Added performance analysis mode for active tab only.
  • Implemented the mode of clearing old cookies and site data when accessing sites with a movement tracking code that the user has not interacted with interactively. The mode is aimed at combating tracking through redirects.
  • Started implementation of modal dialogs that are tied to individual tabs and do not block the entire interface.

    Firefox for Wayland brings WebGL and video hardware acceleration

Source: opennet.ru

Add a comment