Introducing Louvre 1.0: A Wayland-based Library for Building Composite Servers

Developers of the Cuarzo OS project presented first release of the library Louvre, which provides components for developing composite servers based on the Wayland protocol. The code is written in C++ and distributed by licensed under GPLv3.

According to the developers, the library is noticeably superior in performance to competing solutions. For example, an example of a composite server written using Louvre louvre-weston-clonereproducing the functionality of the Weston project, compared to Weston and Sway consumes in the conducted tests less CPU and GPU resources, and also allows you to achieve consistently high FPS, even in difficult scenarios.

Advertisement

The library takes care of all low-level operations, including managing graphics buffers, interacting with input subsystems and graphics APIs in Linux, and also offers ready-made implementations of various extensions of the Wayland protocol. The presence of ready-made components makes it possible not to spend months of work on creating standard low-level elements, but to immediately receive a ready-made and working composite server framework, which can be adapted to your needs and supplemented with the necessary extended functionality. If necessary, the developer can override the methods provided by the library to handle protocols, input events, and rendering events.

Key features of Louvre:

  • Support for multi-GPU configurations (Multi-GPU).
  • Supports multiple user sessions (Multi-Session, TTY switching).
  • Rendering system with support for 2D rendering-based methods LPainter), scenes ((Scene) and representations (Views).
  • Ability to use your own shaders and OpenGL ES 2.0 programs.
  • Automatic redrawing performed as needed (only when the contents of the area change).
  • Multi-threaded work, allowing you to achieve high FPS with v-sync enabled even when rendering complex scenarios (single-threaded implementations have problems maintaining high FPS due to missing frames that cannot be processed due to delays waiting for synchronization with the frame blanking pulse (vblank ).

  • Supports single, double and triple buffering.
  • Implementation of a clipboard for text data.
  • Wayland and extensions support:
    • XDG Shell is an interface for creating and interacting with surfaces as windows, which allows you to move them around the screen, minimize, maximize, resize, etc.
    • XDG Decoration – rendering window decorations on the server side.
    • Presentation Time – provides video display.
    • Linux DMA-Buf – sharing of multiple video cards using dma-buf technology.
  • Supports work in environments based on Intel (i915), AMD (amdgpu) and NVIDIA drivers (proprietary driver or nouveau).
  • Features not yet implemented (in the list of plans):
    • Touch Events – processing touch screen events.
    • Pointer Gestures – control from touch screens.
    • Viewporter – allows the client to perform server-side scaling and trimming of surface edges.
    • Transforming LView objects.
    • XWayland – launching X11 applications.

Advertisement

Thanks for reading: