7720dde74d
The original motivation is the following crash: #0 0x00007f0ddeddeef5 in raise () at /usr/lib/libc.so.6 #1 0x00007f0ddedc8862 in abort () at /usr/lib/libc.so.6 #2 0x00007f0ddedc8747 in _nl_load_domain.cold () at /usr/lib/libc.so.6 #3 0x00007f0ddedd7646 in () at /usr/lib/libc.so.6 #4 0x00007f0de033f8de in gles2_get_renderer_in_context (wlr_renderer=0x612000003640) at ../subprojects/wlroots/render/gles2/renderer.c:38 #5 0x00007f0de0341675 in gles2_begin (wlr_renderer=0x612000003640, width=3840, height=2160) at ../subprojects/wlroots/render/gles2/renderer.c:186 #6 0x00007f0de033b100 in wlr_renderer_begin (r=0x612000003640, width=3840, height=2160) at ../subprojects/wlroots/render/wlr_renderer.c:56 #7 0x00007f0de03466ed in gles2_blit_dmabuf (wlr_renderer=0x612000003640, dst_attr=0x60b000150148, src_attr=0x7fff9f9bfde0) at ../subprojects/wlroots/render/gles2/renderer.c:591 #8 0x00007f0de033d717 in wlr_renderer_blit_dmabuf (r=0x612000003640, dst=0x60b000150148, src=0x7fff9f9bfde0) at ../subprojects/wlroots/render/wlr_renderer.c:210 #9 0x00007f0de04cbc3b in frame_handle_output_commit (listener=0x611000220bc8, data=0x7fff9f9c0050) at ../subprojects/wlroots/types/wlr_screencopy_v1.c:303 The GLES2 renderer assumes it'll have a wlr_buffer to render to. Instead of accomodating for the edge-case of rendering without a wlr_buffer, drop wlr_renderer_blit_dmabuf calls and instead use wlr_renderer_bind_buffer just like the rest of the wlr_renderer users. wlr_renderer_blit_dmabuf is now unused in wlroots. The upside is that the new blit_dmabuf function in screencopy is renderer-agnostic. |
||
---|---|---|
.builds | ||
backend | ||
docs | ||
examples | ||
include | ||
protocol | ||
render | ||
tinywl | ||
types | ||
util | ||
xcursor | ||
xwayland | ||
.editorconfig | ||
.gitignore | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
meson.build | ||
meson_options.txt | ||
wlroots.syms |
README.md
wlroots
Pluggable, composable, unopinionated modules for building a Wayland compositor; or about 50,000 lines of code you were going to write anyway.
- wlroots provides backends that abstract the underlying display and input hardware, including KMS/DRM, libinput, Wayland, X11, and headless backends, plus any custom backends you choose to write, which can all be created or destroyed at runtime and used in concert with each other.
- wlroots provides unopinionated, mostly standalone implementations of many Wayland interfaces, both from wayland.xml and various protocol extensions. We also promote the standardization of portable extensions across many compositors.
- wlroots provides several powerful, standalone, and optional tools that implement components common to many compositors, such as the arrangement of outputs in physical space.
- wlroots provides an Xwayland abstraction that allows you to have excellent Xwayland support without worrying about writing your own X11 window manager on top of writing your compositor.
- wlroots provides a renderer abstraction that simple compositors can use to avoid writing GL code directly, but which steps out of the way when your needs demand custom rendering code.
wlroots implements a huge variety of Wayland compositor features and implements them right, so you can focus on the features that make your compositor unique. By using wlroots, you get high performance, excellent hardware compatibility, broad support for many wayland interfaces, and comfortable development tools - or any subset of these features you like, because all of them work independently of one another and freely compose with anything you want to implement yourself.
Check out our wiki to get started with wlroots.
wlroots is developed under the direction of the sway project. A variety of wrapper libraries are available for using it with your favorite programming language.
Building
Install dependencies:
- meson
- wayland
- wayland-protocols
- EGL
- GLESv2
- libdrm
- GBM
- libinput
- xkbcommon
- udev
- pixman
- libseat (optional, for seatd support)
- systemd (optional, for logind support)
- elogind (optional, for logind support on systems without systemd)
- libuuid (optional, for xdg-foreign support)
If you choose to enable X11 support:
- xwayland (build-time only, optional at runtime)
- xcb
- xcb-composite
- xcb-xfixes
- xcb-xinput
- xcb-image
- xcb-render
- xcb-errors (optional, for improved error reporting)
- xcb-icccm (optional, for improved Xwayland introspection)
Run these commands:
meson build/
ninja -C build/
Install like so:
sudo ninja -C build/ install
Contributing
See CONTRIBUTING.md.