summaryrefslogtreecommitdiffstats
path: root/meta-agl-core
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl-core')
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-backend-Add-weston_get_backend_type.patch79
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc1
2 files changed, 80 insertions, 0 deletions
diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-backend-Add-weston_get_backend_type.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-backend-Add-weston_get_backend_type.patch
new file mode 100644
index 000000000..01d5f91d6
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston/0001-backend-Add-weston_get_backend_type.patch
@@ -0,0 +1,79 @@
+From fcccf1b63dc3cbf6063238c39a31197f0d32364c Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Fri, 13 Dec 2024 17:14:44 +0200
+Subject: [PATCH] backend: Add weston_get_backend_type
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ include/libweston/libweston.h | 3 +++
+ libweston/backend.h | 5 +++++
+ libweston/compositor.c | 19 +++++++++++++++++++
+ 3 files changed, 27 insertions(+)
+
+diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h
+index 077c16b..da6200d 100644
+--- a/include/libweston/libweston.h
++++ b/include/libweston/libweston.h
+@@ -2685,6 +2685,9 @@ weston_compositor_add_screenshot_authority(struct weston_compositor *compositor,
+ int
+ weston_compositor_backends_loaded(struct weston_compositor *compositor);
+
++enum weston_compositor_backend
++weston_get_backend_type(struct weston_backend *backend);
++
+ #ifdef __cplusplus
+ }
+ #endif
+diff --git a/libweston/backend.h b/libweston/backend.h
+index 495d0a5..9b12544 100644
+--- a/libweston/backend.h
++++ b/libweston/backend.h
+@@ -120,6 +120,11 @@ struct weston_backend {
+ */
+ bool (*can_scanout_dmabuf)(struct weston_backend *backend,
+ struct linux_dmabuf_buffer *buffer);
++
++ /** Identifies a particular backend_type from one
++ * defined in weston_compositor_backend.
++ */
++ enum weston_compositor_backend backend_type;
+ };
+
+ /* weston_head */
+diff --git a/libweston/compositor.c b/libweston/compositor.c
+index 41459eb..ef1932f 100644
+--- a/libweston/compositor.c
++++ b/libweston/compositor.c
+@@ -9691,6 +9691,7 @@ weston_compositor_load_backend(struct weston_compositor *compositor,
+ return NULL;
+
+ b = wl_container_of(compositor->backend_list.next, b, link);
++ b->backend_type = backend;
+
+ /* Return the last loaded backend. */
+ return b;
+@@ -9954,3 +9955,21 @@ weston_output_finish_frame_from_timer(struct weston_output *output)
+
+ weston_output_finish_frame(output, &ts, 0);
+ }
++
++/** Retrieve the backend type of as described in enum
++ * weston_compositor_backend.
++ *
++ * Note that the backend must be loaded, with weston_compositor_load_backend
++ *
++ * \param backend weston_backend in question
++ * \returns a type of enum weston_compositor_backend
++ *
++ * \sa weston_compositor_load_backend
++ *
++ */
++WL_EXPORT enum weston_compositor_backend
++weston_get_backend_type(struct weston_backend *backend)
++{
++ assert(backend);
++ return backend->backend_type;
++}
+--
+2.43.0
+
diff --git a/meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc b/meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc
index 31e2a2bf9..f4f5e4c17 100644
--- a/meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc
+++ b/meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc
@@ -4,6 +4,7 @@ SRC_URI:append = " \
file://0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch \
file://0001-backend-drm-don-t-leak-gem_handle_refcnt-in-drm_dest.patch \
file://0002-backend-drm-always-create-gem_handle_refcnt-hash-tab.patch \
+ file://0001-backend-Add-weston_get_backend_type.patch \
"
WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"