2015-06-23 16:56:59 +02:00
|
|
|
From 968a11158031d5d51e63f18cf4cddea7ae23177f Mon Sep 17 00:00:00 2001
|
2015-06-23 16:33:29 +02:00
|
|
|
From: Stefan Dirsch <sndirsch@suse.de>
|
2015-06-23 16:56:59 +02:00
|
|
|
Date: Tue, 23 Jun 2015 16:43:51 +0200
|
2015-06-23 16:33:29 +02:00
|
|
|
Subject: [PATCH] Fixed build against wayland 1.2.1
|
|
|
|
|
|
|
|
Wayland 1.2.1 still lacks definition of WL_SHM_FORMAT_RGB565 format.
|
|
|
|
---
|
2015-06-23 16:56:59 +02:00
|
|
|
src/egl/drivers/dri2/platform_wayland.c | 10 +---------
|
|
|
|
1 file changed, 1 insertion(+), 9 deletions(-)
|
2015-06-23 16:33:29 +02:00
|
|
|
|
|
|
|
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
|
2015-06-23 16:56:59 +02:00
|
|
|
index ea2f9f2..4351e08 100644
|
2015-06-23 16:33:29 +02:00
|
|
|
--- a/src/egl/drivers/dri2/platform_wayland.c
|
|
|
|
+++ b/src/egl/drivers/dri2/platform_wayland.c
|
2015-06-23 16:56:59 +02:00
|
|
|
@@ -1236,9 +1236,6 @@ dri2_initialize_wayland_drm(_EGLDriver *drv, _EGLDisplay *disp)
|
2015-06-23 16:33:29 +02:00
|
|
|
static int
|
|
|
|
dri2_wl_swrast_get_stride_for_format(int format, int w)
|
|
|
|
{
|
2015-06-23 16:56:59 +02:00
|
|
|
- if (format == WL_SHM_FORMAT_RGB565)
|
|
|
|
- return 2 * w;
|
|
|
|
- else /* ARGB8888 || XRGB8888 */
|
2015-06-23 16:33:29 +02:00
|
|
|
return 4 * w;
|
|
|
|
}
|
|
|
|
|
2015-06-23 16:56:59 +02:00
|
|
|
@@ -1672,9 +1669,7 @@ dri2_wl_swrast_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
2015-06-23 16:33:29 +02:00
|
|
|
if (!_eglInitSurface(&dri2_surf->base, disp, EGL_WINDOW_BIT, conf, attrib_list))
|
|
|
|
goto cleanup_surf;
|
|
|
|
|
2015-06-23 16:56:59 +02:00
|
|
|
- if (conf->RedSize == 5)
|
|
|
|
- dri2_surf->format = WL_SHM_FORMAT_RGB565;
|
|
|
|
- else if (conf->AlphaSize == 0)
|
2015-06-23 16:33:29 +02:00
|
|
|
+ if (conf->AlphaSize == 0)
|
|
|
|
dri2_surf->format = WL_SHM_FORMAT_XRGB8888;
|
|
|
|
else
|
|
|
|
dri2_surf->format = WL_SHM_FORMAT_ARGB8888;
|
2015-06-23 16:56:59 +02:00
|
|
|
@@ -1728,9 +1723,6 @@ shm_handle_format(void *data, struct wl_shm *shm, uint32_t format)
|
2015-06-23 16:33:29 +02:00
|
|
|
case WL_SHM_FORMAT_XRGB8888:
|
|
|
|
dri2_dpy->formats |= HAS_XRGB8888;
|
|
|
|
break;
|
2015-06-23 16:56:59 +02:00
|
|
|
- case WL_SHM_FORMAT_RGB565:
|
|
|
|
- dri2_dpy->formats |= HAS_RGB565;
|
|
|
|
- break;
|
2015-06-23 16:33:29 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
|
|
|
1.8.4.5
|
|
|
|
|