Documentation for <wlr/types/wlr_shm.h>

Back to index

Table of contents

struct wlr_shm

struct wlr_shm;

Shared memory buffer interface.

The buffers created via this interface are not safe to use from different threads.

Currently, accessing two buffers concurrently via wlr_buffer_begin_data_ptr_access() will return an error.

wlr_shm_create()

struct wlr_shm *wlr_shm_create(​struct wl_display *display, uint32_t version, const uint32_t *formats, size_t formats_len);

Create the wl_shm global.

Compositors using struct wlr_renderer should use wlr_shm_create_with_renderer() instead.

wlr_shm_create_with_renderer()

struct wlr_shm *wlr_shm_create_with_renderer(​struct wl_display *display, uint32_t version, struct wlr_renderer *renderer);

Create the wl_shm global.

The pixel formats advertised to clients are taken from the struct wlr_renderer.