From dbb228360317872e7c6fcbd96faaf404535130c3 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Tue, 25 Jun 2024 15:39:12 -0400 Subject: Add meta-agl-flutter Add meta-agl-flutter layer as it is being moved from meta-agl-devel. The files are copies of the state in meta-agl-devel as of commit 97310e35, with only a minor change to the feature template to adjust the location of the layer for bblayers.conf. Bug-AGL: SPEC-5184 Change-Id: I9a14e4ab3a1b1726b0ccc1dbc112d76864dd106c Signed-off-by: Scott Murray Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/30016 Tested-by: Jan-Simon Moeller Reviewed-by: Jan-Simon Moeller --- ...splay-Add-support-for-wl_output-version-4.patch | 117 +++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 meta-agl-flutter/recipes-graphics/toyota/files/0001-display-Add-support-for-wl_output-version-4.patch (limited to 'meta-agl-flutter/recipes-graphics/toyota/files/0001-display-Add-support-for-wl_output-version-4.patch') diff --git a/meta-agl-flutter/recipes-graphics/toyota/files/0001-display-Add-support-for-wl_output-version-4.patch b/meta-agl-flutter/recipes-graphics/toyota/files/0001-display-Add-support-for-wl_output-version-4.patch new file mode 100644 index 000000000..6b1b3e4c9 --- /dev/null +++ b/meta-agl-flutter/recipes-graphics/toyota/files/0001-display-Add-support-for-wl_output-version-4.patch @@ -0,0 +1,117 @@ +From 10d1d855a0ce4557cb710e73e3e7c9ab0dd0e734 Mon Sep 17 00:00:00 2001 +From: Marius Vlad +Date: Mon, 4 Dec 2023 14:16:36 +0200 +Subject: [PATCH 1/2] display: Add support for wl_output version 4 + +This allows support for wl_output.name and wl_output.desc be sent out +by the compositor that supports it. + +Signed-off-by: Marius Vlad +--- + shell/wayland/display.cc | 34 ++++++++++++++++++++++++++++++---- + shell/wayland/display.h | 28 ++++++++++++++++++++++++++++ + 2 files changed, 58 insertions(+), 4 deletions(-) + +diff --git a/shell/wayland/display.cc b/shell/wayland/display.cc +index 8e309ef..3ee814a 100644 +--- a/shell/wayland/display.cc ++++ b/shell/wayland/display.cc +@@ -191,9 +191,16 @@ void Display::registry_handle_global(void* data, + auto oi = std::make_shared(); + std::fill_n(oi.get(), 1, output_info_t{}); + oi->global_id = name; +- oi->output = static_cast( +- wl_registry_bind(registry, name, &wl_output_interface, +- std::min(static_cast(2), version))); ++ // be compat with v2 as well ++ if (version >= WL_OUTPUT_NAME_SINCE_VERSION && ++ version >= WL_OUTPUT_DESCRIPTION_SINCE_VERSION) ++ oi->output = static_cast( ++ wl_registry_bind(registry, name, &wl_output_interface, ++ std::min(static_cast(4), version))); ++ else ++ oi->output = static_cast( ++ wl_registry_bind(registry, name, &wl_output_interface, ++ std::min(static_cast(2), version))); + wl_output_add_listener(oi->output, &output_listener, oi.get()); + SPDLOG_DEBUG("Wayland: Output [{}]", d->m_all_outputs.size()); + d->m_all_outputs.push_back(oi); +@@ -299,9 +306,28 @@ void Display::display_handle_done(void* data, + oi->done = true; + } + ++void Display::display_handle_name(void* data, ++ struct wl_output* /* wl_output */, ++ const char* name) { ++ auto* oi = static_cast(data); ++ oi->name = std::string(name); ++} ++ ++void Display::display_handle_desc(void* data, ++ struct wl_output* /* wl_output */, ++ const char* desc) { ++ auto* oi = static_cast(data); ++ oi->desc = std::string(desc); ++} ++ + const struct wl_output_listener Display::output_listener = { + display_handle_geometry, display_handle_mode, display_handle_done, +- display_handle_scale}; ++ display_handle_scale ++#if defined(WL_OUTPUT_NAME_SINCE_VERSION) && \ ++ defined(WL_OUTPUT_DESCRIPTION_SINCE_VERSION) ++ , display_handle_name, display_handle_desc ++#endif ++}; + + void Display::shm_format(void* /* data */, + struct wl_shm* /* wl_shm */, +diff --git a/shell/wayland/display.h b/shell/wayland/display.h +index cc3f4be..a0756f0 100644 +--- a/shell/wayland/display.h ++++ b/shell/wayland/display.h +@@ -329,6 +329,8 @@ class Display { + int32_t scale; + MAYBE_UNUSED bool done; + int transform; ++ std::string name; ++ std::string desc; + } output_info_t; + + struct pointer_event { +@@ -520,6 +522,32 @@ class Display { + */ + static void display_handle_done(void* data, struct wl_output* wl_output); + ++ /** ++ * @brief Set the display output name ++ * @param[in,out] data Data of type output_info_t* ++ * @param[in] wl_output No use ++ * @param[in] output_name Display name ++ * @return void ++ * @relation ++ * wayland - since @v4 of wl_output ++ */ ++ static void display_handle_name(void* data, ++ struct wl_output* wl_output, ++ const char* output_name); ++ ++ /** ++ * @brief Set the display description ++ * @param[in,out] data Data of type output_info_t* ++ * @param[in] wl_output No use ++ * @param[in] desc_name Display description name ++ * @return void ++ * @relation ++ * wayland - since @v4 of wl_output ++ */ ++ static void display_handle_desc(void* data, ++ struct wl_output* wl_output, ++ const char* desc_name); ++ + static const struct wl_shm_listener shm_listener; + + /** +-- +2.35.1 + -- cgit 1.2.3-korg