GFXprim
2D bitmap graphics library with emphasis on speed and correctness
|
A SHM pixmap. More...
Go to the source code of this file.
Data Structures | |
struct | gp_proxy_shm |
A SHM pixmap. More... | |
Typedefs | |
typedef struct gp_proxy_shm | gp_proxy_shm |
A SHM pixmap. | |
Functions | |
gp_proxy_shm * | gp_proxy_shm_init (const char *path, gp_size w, gp_size h, gp_pixel_type type) |
Creates an SHM pixmap. | |
int | gp_proxy_shm_resize (gp_proxy_shm *self, gp_size w, gp_size h) |
Resizes a SHM pixmap. | |
void | gp_proxy_shm_exit (gp_proxy_shm *self) |
Removes a SHM pixmap. | |
A SHM pixmap.
Definition in file gp_proxy_shm.h.
void gp_proxy_shm_exit | ( | gp_proxy_shm * | self | ) |
Removes a SHM pixmap.
self | A SHM pixmap to be removed and deallocated. |
gp_proxy_shm * gp_proxy_shm_init | ( | const char * | path, |
gp_size | w, | ||
gp_size | h, | ||
gp_pixel_type | type | ||
) |
Creates an SHM pixmap.
This is called by the server to initialize a SHM pixmap for the application to render to. The SHM segment size is rounded to PAGE_SIZE.
path | in the /dev/shm/ filesystem, 64 bytes at max. |
w | Image width. |
h | Image height. |
type | Image pixel type. |
int gp_proxy_shm_resize | ( | gp_proxy_shm * | self, |
gp_size | w, | ||
gp_size | h | ||
) |
Resizes a SHM pixmap.
Resizes SHM image. All applications have unmap the buffer before this call is called and have to remap the shm before they attempt to use it again.
self | A SHM pixmap. |
w | New width. @parm h New height. |