[PATCH 3/3] shm: fill in base buffer layout.

Gwenole Beauchesne gb.devel at gmail.com
Fri May 18 10:20:38 PDT 2012


Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
---
 src/wayland-shm.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/wayland-shm.c b/src/wayland-shm.c
index 7900ba1..020d09b 100644
--- a/src/wayland-shm.c
+++ b/src/wayland-shm.c
@@ -88,10 +88,14 @@ shm_pool_create_buffer(struct wl_client *client, struct wl_resource *resource,
 {
 	struct wl_shm_pool *pool = resource->data;
 	struct wl_shm_buffer *buffer;
+	uint32_t base_format;
 
 	switch (format) {
 	case WL_SHM_FORMAT_ARGB8888:
+		base_format = WL_BUFFER_FORMAT_ARGB8888;
+		break;
 	case WL_SHM_FORMAT_XRGB8888:
+		base_format = WL_BUFFER_FORMAT_XRGB8888;
 		break;
 	default:
 		wl_resource_post_error(resource,
@@ -116,6 +120,7 @@ shm_pool_create_buffer(struct wl_client *client, struct wl_resource *resource,
 		return;
 	}
 
+	buffer->buffer.format = base_format;
 	buffer->buffer.width = width;
 	buffer->buffer.height = height;
 	buffer->format = format;
-- 
1.7.5.4



More information about the wayland-devel mailing list