mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
Updates in line with latest wayland protocol
The shm buffer format enum values were renamed and the explicitly premultiplied format was dropped since it's now assumed if the buffer has an alpha component then it's premultiplied.
This commit is contained in:
parent
2a6d93dfd2
commit
50d1285ba1
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user