wl_buffer
also: buffer (in Wayland context), wl_buffer object
A Wayland protocol object representing a region of memory containing pixel data that can be displayed on screen; the equivalent of a framebuffer in the Wayland display server architecture.
wl_buffer is a Wayland protocol interface that encapsulates a block of memory—typically containing image or pixel data—that a client application wants to display. Rather than directly accessing video memory like in X11, Wayland clients create buffers through buffer factories (like wl_shm for shared memory or GPU-specific protocols) and attach them to surfaces for rendering.
When an application wants to update its window content, it allocates a wl_buffer, writes pixel data into it, attaches the buffer to its wl_surface, and commits the change. The Wayland compositor then composites this buffer with others and displays the result. Once committed, the client should not modify the buffer until the compositor signals it's done with wl_buffer.release.
Example: A simple Wayland client might create a shared-memory buffer via wl_shm_pool, fill it with red pixels, attach it to its surface with wl_surface.attach(), and commit. The compositor reads from this buffer to render the window on screen.