Add a shm buffer sharing mechanism

This commit is contained in:
Kristian Høgsberg 2010-10-06 21:17:40 -04:00
parent 98ffc93b95
commit 3d5bae0700
8 changed files with 286 additions and 46 deletions

View file

@ -68,6 +68,17 @@
<event name="authenticated"/>
</interface>
<interface name="shm" version="1">
<request name="create_buffer">
<arg name="id" type="new_id" interface="buffer"/>
<arg name="fd" type="fd"/>
<arg name="width" type="int"/>
<arg name="height" type="int"/>
<arg name="stride" type="uint"/>
<arg name="visual" type="object" interface="visual"/>
</request>
</interface>
<interface name="buffer" version="1">
<request name="destroy" type="destructor"/>
</interface>

View file

@ -107,6 +107,13 @@ struct wl_resource {
struct wl_buffer {
struct wl_resource base;
struct wl_compositor *compositor;
struct wl_visual *visual;
int32_t width, height;
void (*attach)(struct wl_buffer *buffer, struct wl_surface *surface);
void (*damage)(struct wl_buffer *buffer,
struct wl_surface *surface,
int32_t x, int32_t y, int32_t width, int32_t height);
};
struct wl_surface {