Add wm_shm_surface: a compositor-owned pixel buffer that bridges pixman
software rendering to the wlroots scene graph.
The struct embeds a wlr_buffer (wl_container_of compatible) so wlroots
can reference-count and GPU-upload the pixel data on demand via the
wlr_buffer_impl vtable (begin_data_ptr_access / end_data_ptr_access /
destroy). A pixman_image_t wrapping the same malloc memory provides the
drawing API.
Four entry points:
wm_shm_surface_create — alloc + wlr_buffer_init + pixman_image_create
wm_shm_surface_fill — pixman_image_composite32(PIXMAN_OP_SRC, ...)
wm_shm_surface_commit — wlr_scene_buffer_create / set_position
wm_shm_surface_destroy — scene node + wlr_buffer_drop (async free)
A 64×64 steel-blue (0xFF4080C0) test surface is committed to the root
scene node at (16,16) inside wl_screen_create_internals, proving the
pixman → wlr_scene_buffer upload pipeline works end-to-end.
Build fixes:
- Add pixman-1 to PKG_CHECK_MODULES in configure.ac so -lpixman-1
appears in WLROOTS_LIBS (linker was missing the symbol).
- Add -I$(srcdir)/backend/wayland to AM_CPPFLAGS in Makefile.am so
generated Wayland protocol headers are found during compilation.
Smoke test: PASS (all existing checks continue to pass; Phase 29 log
line "Phase 29 test surface committed" confirms the pipeline fires).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add --enable-wayland-backend configure option (default: auto).
Requires wlroots >= 0.15, wayland-server, xkbcommon via pkg-config.
Detected at build time on this system: wlroots 0.15.1.
New files:
src/backend/wayland/wl_backend.h — declares extern const WMBackend wl_backend
src/backend/wayland/wl_backend.c — complete stub vtable (108 slots)
All stubs return safe zero/null/false values. Every slot matches the
exact WMBackend function-pointer signature; zero compiler warnings.
Build system compiles the Wayland backend files conditionally when
USE_WAYLAND_BACKEND is set; WLROOTS_CFLAGS/LIBS wired into AM_CFLAGS
and wmaker_LDADD.
Subsequent phases will replace stubs with real wlroots implementations.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>