summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-07-05 17:14:24 -0400
committerKristian Høgsberg <krh@bitplanet.net>2012-07-09 15:32:19 -0400
commit3e4cde949c65880b220e4e190ebf0c83470f0a71 (patch)
treec59c9352899ca071bf430301078b6c437d661775
parent8a023688c07fe2d377c4bc9631ce2fe7a9afee60 (diff)
wl_buffer: Add a content type fieldyuv
The content type field describe the colorspace and components in the buffer and how they map to rgba components in the shader.
-rw-r--r--protocol/wayland.xml8
-rw-r--r--src/wayland-server.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 54fb9e0..506bf07 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -220,6 +220,14 @@
</interface>
<interface name="wl_buffer" version="1">
+ <enum name="content">
+ <entry name="rgba" value="1"/>
+ <entry name="rgb" value="2"/>
+ <entry name="y_u_v" value="3"/>
+ <entry name="y_uv" value="4"/>
+ <entry name="y_xuxv" value="5"/>
+ </enum>
+
<description summary="content for a wl_surface">
A buffer provides the content for a wl_surface. Buffers are
created through factory interfaces such as wl_drm, wl_shm or
diff --git a/src/wayland-server.h b/src/wayland-server.h
index 18a8beb..3291207 100644
--- a/src/wayland-server.h
+++ b/src/wayland-server.h
@@ -178,6 +178,7 @@ struct wl_resource {
struct wl_buffer {
struct wl_resource resource;
int32_t width, height;
+ uint32_t content;
uint32_t busy_count;
};