A global singleton object that provides support for shared memory.
Clients can create wl_shm_pool objects using the create_pool request.
At connection setup time, the wl_shm object emits one or more format events to inform clients about the valid pixel formats that can be used for buffers.
A.6.1. Requests provided by wl_shm
A.6.1.1. wl_shm::create_pool - create a shm pool
Create a new wl_shm_pool object.
The pool can be used to create shared memory based buffer objects. The server will mmap size bytes of the passed file descriptor, to use as backing memory for the pool.
wl_shm::create_pool arguments
id
Type: new_id
fd
Type: fd
size
Type: int
A.6.2. Events provided by wl_shm
A.6.2.1. wl_shm::format - pixel format description
Informs the client about a valid pixel format that can be used for buffers. Known formats include argb8888 and xrgb8888.
wl_shm::format arguments
format
Type: uint
A.6.3. Enums provided by wl_shm
A.6.3.1. wl_shm::error - wl_shm error values
These errors can be emitted in response to wl_shm requests.
wl_shm::error values
invalid_format
Value: 0
buffer format is not known
invalid_stride
Value: 1
invalid size or stride during pool or buffer creation
invalid_fd
Value: 2
mmapping the file descriptor failed
A.6.3.2. wl_shm::format - pixel formats
This describes the memory layout of an individual pixel.
All renderers should support argb8888 and xrgb8888 but any other formats are optional and may not be supported by the particular renderer in use.