[mutter] wayland/dma-buf: Add support for BGR_8888 formats



commit 922878acc63a41b301f5958a1ddbed817d9b639b
Author: Erfan Abdi <erfangplus gmail com>
Date:   Sun Sep 12 11:02:00 2021 +0430

    wayland/dma-buf: Add support for BGR_8888 formats
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1999>

 src/wayland/meta-wayland-dma-buf.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/wayland/meta-wayland-dma-buf.c b/src/wayland/meta-wayland-dma-buf.c
index ae1f0f9422..0d30684b7b 100644
--- a/src/wayland/meta-wayland-dma-buf.c
+++ b/src/wayland/meta-wayland-dma-buf.c
@@ -115,9 +115,15 @@ meta_wayland_dma_buf_realize_texture (MetaWaylandBuffer  *buffer,
     case DRM_FORMAT_XRGB8888:
       cogl_format = COGL_PIXEL_FORMAT_RGB_888;
       break;
+    case DRM_FORMAT_XBGR8888:
+      cogl_format = COGL_PIXEL_FORMAT_BGR_888;
+      break;
     case DRM_FORMAT_ARGB8888:
       cogl_format = COGL_PIXEL_FORMAT_ARGB_8888_PRE;
       break;
+    case DRM_FORMAT_ABGR8888:
+      cogl_format = COGL_PIXEL_FORMAT_ABGR_8888_PRE;
+      break;
     case DRM_FORMAT_XRGB2101010:
       cogl_format = COGL_PIXEL_FORMAT_XRGB_2101010;
       break;
@@ -713,7 +719,9 @@ dma_buf_bind (struct wl_client *client,
   wl_resource_set_implementation (resource, &dma_buf_implementation,
                                   compositor, NULL);
   send_modifiers (resource, DRM_FORMAT_ARGB8888);
+  send_modifiers (resource, DRM_FORMAT_ABGR8888);
   send_modifiers (resource, DRM_FORMAT_XRGB8888);
+  send_modifiers (resource, DRM_FORMAT_XBGR8888);
   send_modifiers (resource, DRM_FORMAT_ARGB2101010);
   send_modifiers (resource, DRM_FORMAT_ABGR2101010);
   send_modifiers (resource, DRM_FORMAT_XRGB2101010);


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