Louvre

 

Louvre

Louvre is released under the GPL v3.0 license. Current Louvre version.

Louvre is a C++ library that aims to simplify the process of creating Wayland compositors by reducing its learning curve and thus allowing developers to focus on the creative and unique features of their compositors.

⏲️ Performance

Louvre offers excellent performance. A benchmark consisting of rendering numerous moving wl_subsurfaces (opaque and translucent), in which the louvre-weston-clone example compositor was tested, shows that Louvre can maintain a high FPS rate even in complex scenarios. Furthermore, it uses fewer CPU and GPU resources than popular compositors like Weston and Sway.

The source code of the benchmark can be found in Louvre/src/benchmark

Here is a graph illustrating the benchmark results. It displays the average FPS of each compositor rendering 1 to 50 moving surfaces using double buffering.

FPS

Most Wayland compositors use a single thread, which drastically slows down their performance when rendering complex scenarios. The reason for this is due to vertical sync, where the compositor must wait a few milliseconds before it can swap the framebuffer it just rendered with the one being displayed on screen. This is done in order to synchronize the swapping with the monitor refresh rate (vblank) and avoid the tearing effect. When working with a single thread, compositors have "dead times" that prevent them from processing and rendering the content in time for the next frame. That's why they end up skipping one frame, causing their refresh rate to drop in half. To avoid this problem, Louvre works with multiple threads. Each output (monitor) renders its content on its own thread, allowing the compositor to continue processing requests and render to other outputs while one is busy. This prevents the compositor from having dead times and therefore allows it to maintain a high refresh rate.

CPU Consumption

On the left are the raw CPU consumption results, which seemingly indicate that Louvre uses more CPU (which is obvious, given its higher FPS rendering). However, when we normalize it to the FPS (graph on the right), we can observe that, in fact, it employs less CPU than the other compositors (relative to FPS).

GPU Consumption

Similarly as with CPU consumption, we can observe that Louvre uses fewer GPU resources than the other compositors.

🖌️ Renderering

Within Louvre, you have the flexibility to either employ your own OpenGL ES 2.0 shaders/programs, use the LPainter class for fundamental 2D rendering, or leverage the scene and views system, which manages buffer damage and can also handle input events for you. Additionally, it's possible to combine these three approaches as needed.

🔲 Tested Hardware

  • Intel (i915 driver)
  • AMD (amdgpu driver)
  • Nvidia (proprietary and nouveau drivers)
  • Mali (lima driver)

Please be aware that specific older nouveau drivers, due to their absence of multithreading support, could lead to crashes. In such instances, it's advisable to consider using proprietary Nvidia drivers.

🧩 Protocols

  • Wayland
  • XDG Shell
  • XDG Decoration Manager
  • Presentation Time
  • Linux DMA-Buf
  • WP Pointer Gestures (WIP)

💬 Buffer Sharing

  • Shared Memory
  • Wayland EGL (GEM flinks are supported)
  • Linux DMA-Buff

👴 Compatible Clients

  • GTK
  • Ozone (Chromium)
  • Qt
  • SDL
  • EFL

💻 Graphical Backends

  • DRM/KMS
  • X11 (removed since version 1.0.0)

🕹️ Input Backends

  • Libinput
  • X11 (removed since version 1.0.0)

Comentarios

Entradas populares de este blog

Creating an OpenGL app without display server on Linux (tutorial)

SRM v0.2.0-1 Release