SDL
2.0
|
Macros | |
#define | WL_SHM_POOL_CREATE_BUFFER_SINCE_VERSION 1 |
#define | WL_SHM_POOL_DESTROY_SINCE_VERSION 1 |
#define | WL_SHM_POOL_RESIZE_SINCE_VERSION 1 |
Functions | |
static void | wl_shm_pool_set_user_data (struct wl_shm_pool *wl_shm_pool, void *user_data) |
static void * | wl_shm_pool_get_user_data (struct wl_shm_pool *wl_shm_pool) |
static struct wl_buffer * | wl_shm_pool_create_buffer (struct wl_shm_pool *wl_shm_pool, int32_t offset, int32_t width, int32_t height, int32_t stride, uint32_t format) |
static void | wl_shm_pool_destroy (struct wl_shm_pool *wl_shm_pool) |
static void | wl_shm_pool_resize (struct wl_shm_pool *wl_shm_pool, int32_t size) |
The wl_shm_pool object encapsulates a piece of memory shared between the compositor and client. Through the wl_shm_pool object, the client can allocate shared memory wl_buffer objects. All objects created through the same pool share the same underlying mapped memory. Reusing the mapped memory avoids the setup/teardown overhead and is useful when interactively resizing a surface or for many small buffers.
#define WL_SHM_POOL_CREATE_BUFFER_SINCE_VERSION 1 |
Definition at line 1237 of file wayland-client-protocol.h.
#define WL_SHM_POOL_DESTROY_SINCE_VERSION 1 |
Definition at line 1241 of file wayland-client-protocol.h.
#define WL_SHM_POOL_RESIZE_SINCE_VERSION 1 |
Definition at line 1245 of file wayland-client-protocol.h.
|
static |
Create a wl_buffer object from the pool.
The buffer is created offset bytes into the pool and has width and height as specified. The stride argument specifies the number of bytes from the beginning of one row to the beginning of the next. The format is the pixel format of the buffer and must be one of those advertised through the wl_shm.format event.
A buffer will keep a reference to the pool it was created from so it is valid to destroy the pool immediately after creating a buffer from it.
Definition at line 1283 of file wayland-client-protocol.h.
References NULL, wl_buffer_interface, and WL_SHM_POOL_CREATE_BUFFER.
|
inlinestatic |
Destroy the shared memory pool.
The mmapped memory will be released when all buffers that have been created from this pool are gone.
Definition at line 1303 of file wayland-client-protocol.h.
References WL_SHM_POOL_DESTROY.
|
inlinestatic |
Definition at line 1256 of file wayland-client-protocol.h.
This request will cause the server to remap the backing memory for the pool from the file descriptor passed when the pool was created, but using the new size. This request can only be used to make the pool bigger.
Definition at line 1320 of file wayland-client-protocol.h.
References WL_SHM_POOL_RESIZE.
|
inlinestatic |
Definition at line 1249 of file wayland-client-protocol.h.