[mutter] wayland/shm: Advertise support for 64 half point RGBA formats



commit d3f629bfa8a7150e2f4d9a46ccfa8322875131f5
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Wed Sep 18 18:38:22 2019 +0200

    wayland/shm: Advertise support for 64 half point RGBA formats
    
    Now that cogl understands them, hook wl_shm up so they can be used.
    
    This also bumps the wayland-server version dependency to 1.17.90, which
    corresponds to the master branch of wayland. The new formats will be
    available in 1.18.0.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/804

 meson.build                       |  2 +-
 src/wayland/meta-wayland-buffer.c | 16 ++++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 25f0b50fba..3ab9c48f64 100644
--- a/meson.build
+++ b/meson.build
@@ -42,7 +42,7 @@ udev_req = '>= 228'
 gudev_req = '>= 232'
 
 # wayland version requirements
-wayland_server_req = '>= 1.13.0'
+wayland_server_req = '>= 1.18'
 wayland_protocols_req = '>= 1.19'
 
 # native backend version requirements
diff --git a/src/wayland/meta-wayland-buffer.c b/src/wayland/meta-wayland-buffer.c
index 312fc26f93..0416edf87a 100644
--- a/src/wayland/meta-wayland-buffer.c
+++ b/src/wayland/meta-wayland-buffer.c
@@ -229,6 +229,18 @@ shm_format_to_cogl_pixel_format (enum wl_shm_format     shm_format,
     case WL_SHM_FORMAT_ABGR2101010:
       format = COGL_PIXEL_FORMAT_ABGR_2101010_PRE;
       break;
+    case WL_SHM_FORMAT_XRGB16161616F:
+      components = COGL_TEXTURE_COMPONENTS_RGB;
+      G_GNUC_FALLTHROUGH;
+    case WL_SHM_FORMAT_ARGB16161616F:
+      format = COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE;
+      break;
+    case WL_SHM_FORMAT_XBGR16161616F:
+      components = COGL_TEXTURE_COMPONENTS_RGB;
+      G_GNUC_FALLTHROUGH;
+    case WL_SHM_FORMAT_ABGR16161616F:
+      format = COGL_PIXEL_FORMAT_RGBA_FP_16161616_PRE;
+      break;
 #endif
     default:
       return FALSE;
@@ -776,6 +788,10 @@ meta_wayland_init_shm (MetaWaylandCompositor *compositor)
     WL_SHM_FORMAT_XRGB2101010,
     WL_SHM_FORMAT_ABGR2101010,
     WL_SHM_FORMAT_XBGR2101010,
+    WL_SHM_FORMAT_ARGB16161616F,
+    WL_SHM_FORMAT_XRGB16161616F,
+    WL_SHM_FORMAT_ABGR16161616F,
+    WL_SHM_FORMAT_XBGR16161616F,
 #endif
   };
   int i;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]