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>