[weston RFC 5/5] pixman-renderer: Add support for SHM buffers in RGB565 format
Tomeu Vizoso
tomeu at tomeuvizoso.net
Fri Jul 5 02:41:16 PDT 2013
---
src/pixman-renderer.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/pixman-renderer.c b/src/pixman-renderer.c
index b17c02f..c162292 100644
--- a/src/pixman-renderer.c
+++ b/src/pixman-renderer.c
@@ -560,6 +560,9 @@ pixman_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
case WL_SHM_FORMAT_ARGB8888:
pixman_format = PIXMAN_a8r8g8b8;
break;
+ case WL_SHM_FORMAT_RGB565:
+ pixman_format = PIXMAN_r5g6b5;
+ break;
default:
weston_log("Unsupported SHM buffer format\n");
weston_buffer_reference(&ps->buffer_ref, NULL);
@@ -667,6 +670,7 @@ bind_shm(struct wl_client *client,
wl_shm_send_format(resource, WL_SHM_FORMAT_ARGB8888);
wl_shm_send_format(resource, WL_SHM_FORMAT_XRGB8888);
+ wl_shm_send_format(resource, WL_SHM_FORMAT_RGB565);
}
WL_EXPORT int
--
1.8.3.1
More information about the wayland-devel
mailing list