diff --git a/cogl/cogl-texture-2d.c b/cogl/cogl-texture-2d.c index ba4c6d086..3350dc166 100644 --- a/cogl/cogl-texture-2d.c +++ b/cogl/cogl-texture-2d.c @@ -507,24 +507,18 @@ cogl_wayland_texture_2d_new_from_buffer (CoglContext *ctx, switch (wl_shm_buffer_get_format (buffer)) { #if G_BYTE_ORDER == G_BIG_ENDIAN - case WL_SHM_FORMAT_PREMULTIPLIED_ARGB32: + case WL_SHM_FORMAT_ARGB8888: format = COGL_PIXEL_FORMAT_ARGB_8888_PRE; break; - case WL_SHM_FORMAT_ARGB32: - format = COGL_PIXEL_FORMAT_ARGB_8888; - break; case WL_SHM_FORMAT_XRGB32: format = COGL_PIXEL_FORMAT_ARGB_8888; internal_format = COGL_PIXEL_FORMAT_RGB_888; break; #elif G_BYTE_ORDER == G_LITTLE_ENDIAN - case WL_SHM_FORMAT_PREMULTIPLIED_ARGB32: + case WL_SHM_FORMAT_ARGB8888: format = COGL_PIXEL_FORMAT_BGRA_8888_PRE; break; - case WL_SHM_FORMAT_ARGB32: - format = COGL_PIXEL_FORMAT_BGRA_8888; - break; - case WL_SHM_FORMAT_XRGB32: + case WL_SHM_FORMAT_XRGB8888: format = COGL_PIXEL_FORMAT_BGRA_8888; internal_format = COGL_PIXEL_FORMAT_BGR_888; break; diff --git a/examples/cogland.c b/examples/cogland.c index 03acf398b..3b2fad04d 100644 --- a/examples/cogland.c +++ b/examples/cogland.c @@ -198,19 +198,17 @@ shm_buffer_damaged (struct wl_buffer *wayland_buffer, switch (wl_shm_buffer_get_format (wayland_buffer)) { #if G_BYTE_ORDER == G_BIG_ENDIAN - case WL_SHM_FORMAT_PREMULTIPLIED_ARGB32: + case WL_SHM_FORMAT_ARGB8888: format = COGL_PIXEL_FORMAT_ARGB_8888_PRE; break; - case WL_SHM_FORMAT_ARGB32: - case WL_SHM_FORMAT_XRGB32: + case WL_SHM_FORMAT_XRGB8888: format = COGL_PIXEL_FORMAT_ARGB_8888; break; #elif G_BYTE_ORDER == G_LITTLE_ENDIAN - case WL_SHM_FORMAT_PREMULTIPLIED_ARGB32: + case WL_SHM_FORMAT_ARGB8888: format = COGL_PIXEL_FORMAT_BGRA_8888_PRE; break; - case WL_SHM_FORMAT_ARGB32: - case WL_SHM_FORMAT_XRGB32: + case WL_SHM_FORMAT_XRGB8888: format = COGL_PIXEL_FORMAT_BGRA_8888; break; #endif