diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2023-05-23 15:48:56 +0300 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2023-05-31 07:36:15 +0000 |
commit | 0ed8064b0de235fa21fb961f0a8789e11ad7f1a4 (patch) | |
tree | 318fd5d2a9ace1587ed5d038f3f0034ac258b348 | |
parent | e0a1dcc5480872fcb1ddafcd8664ef1b92f9446b (diff) |
compositor: Remove Waltham support
Waltham hasn't been used in a while, its support has been removed for
some time, we've been deprecating it last release so it's time to remove
it from the compositor as well.
Bug-AGL: SPEC-4669
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Iaf1e467b1228051fd96cac424ac6781d67f9fefa
-rw-r--r-- | meson.build | 26 | ||||
-rw-r--r-- | meson_options.txt | 7 | ||||
-rw-r--r-- | src/compositor.c | 96 | ||||
-rw-r--r-- | src/desktop.c | 4 | ||||
-rw-r--r-- | src/ivi-compositor.h | 15 | ||||
-rw-r--r-- | src/shell.c | 89 |
6 files changed, 0 insertions, 237 deletions
diff --git a/meson.build b/meson.build index 388f785..2079fb1 100644 --- a/meson.build +++ b/meson.build @@ -64,25 +64,6 @@ foreach depname : depnames endforeach -# the transmitter plug-in requires waltham but we don't have a cflags or libs -# for it so we add waltham depends here. Further more, the output is being -# handled by remoting plug-in -depnames_waltham = [ - 'waltham', 'waltham-transmitter', -] - -deps_waltham = [] -foreach depname : depnames_waltham - dep = dependency(depname, required: false) - if dep.found() - deps_waltham += dep - else - message('Waltham requires @0@ which was not found. '.format(depname)) - endif -endforeach - -deps_waltham += deps_remoting - agl_shell_xml = files('protocol/agl-shell.xml') agl_shell_desktop_xml = files('protocol/agl-shell-desktop.xml') agl_screenshooter = files('protocol/agl-screenshooter.xml') @@ -225,13 +206,6 @@ if deps_remoting.length() == depnames.length() message('Found remoting depends, enabling remoting') endif -if deps_waltham.length() == depnames_waltham.length() + depnames.length() and not get_option('waltham') - message('Found waltham depends, but waltham is deprecated') -elif deps_waltham.length() == depnames_waltham.length() + depnames.length() and get_option('waltham') - config_h.set('HAVE_WALTHAM', 1) - message('Found waltham depends, enabling waltham') -endif - if dep_libsmack.found() config_h.set('HAVE_SMACK', 1) deps_libweston += dep_libsmack diff --git a/meson_options.txt b/meson_options.txt index e4d8f3d..1e54773 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -12,10 +12,3 @@ option( value: true, description: 'Build gRPC proxy which exposes some of the agl-shell protocol over a gRPC API' ) - -option( - 'waltham', - type: 'boolean', - value: false, - description: 'Build compositor with Waltham support. Disabled by default' -) diff --git a/src/compositor.c b/src/compositor.c index ef06314..9b0ac5f 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -60,10 +60,6 @@ #include "remote.h" #endif -#ifdef HAVE_WALTHAM -#include <waltham-transmitter/transmitter_api.h> -#endif - static int cached_tm_mday = -1; static struct weston_log_scope *log_scope; @@ -707,38 +703,6 @@ heads_changed(struct wl_listener *listener, void *arg) } } -#ifdef HAVE_WALTHAM -static int -load_waltham_plugin(struct ivi_compositor *ivi, struct weston_config *config) -{ - struct weston_compositor *compositor = ivi->compositor; - int (*module_init)(struct weston_compositor *wc); - - module_init = weston_load_module("waltham-transmitter.so", - "wet_module_init"); - if (!module_init) - return -1; - - if (module_init(compositor) < 0) - return -1; - - ivi->waltham_transmitter_api = weston_get_transmitter_api(compositor); - if (!ivi->waltham_transmitter_api) { - weston_log("Failed to load waltham-transmitter plugin.\n"); - return -1; - } - - weston_log("waltham-transmitter plug-in loaded\n"); - return 0; -} -#else -static int -load_waltham_plugin(struct ivi_compositor *ivi, struct weston_config *config) -{ - return -1; -} -#endif - #ifdef HAVE_REMOTING static int drm_backend_remoted_output_configure(struct weston_output *output, @@ -915,62 +879,6 @@ ivi_enable_remote_outputs(struct ivi_compositor *ivi) } } -static void -ivi_enable_waltham_outputs(struct ivi_compositor *ivi) -{ - struct weston_config_section *transmitter_section = NULL; - const char *sect_name; - struct weston_config *config = ivi->config; - - while (weston_config_next_section(config, &transmitter_section, §_name)) { - if (strcmp(sect_name, "transmitter-output")) - continue; - - struct ivi_output *ivi_output = NULL; - bool output_found = false; - char *_name = NULL; - - weston_config_section_get_string(transmitter_section, - "name", &_name, NULL); - wl_list_for_each(ivi_output, &ivi->outputs, link) { - if (!strcmp(ivi_output->name, _name)) { - output_found = true; - break; - } - } - - if (output_found) { - free(_name); - continue; - } - - ivi_output = zalloc(sizeof(*ivi_output)); - if (!ivi_output) { - free(_name); - continue; - } - - ivi_output->ivi = ivi; - ivi_output->name = _name; - ivi_output->config = transmitter_section; - - if (remote_output_init(ivi_output, ivi->compositor, - transmitter_section, ivi->remoting_api)) { - free(ivi_output->name); - free(ivi_output); - continue; - } - - ivi_output->type = OUTPUT_WALTHAM; - ivi_output->output_destroy.notify = handle_output_destroy; - weston_output_add_destroy_listener(ivi_output->output, - &ivi_output->output_destroy); - - wl_list_insert(&ivi->outputs, &ivi_output->link); - ivi_output_configure_app_id(ivi_output); - } -} - static int load_remoting_plugin(struct ivi_compositor *ivi, struct weston_config *config) { @@ -1050,7 +958,6 @@ load_drm_backend(struct ivi_compositor *ivi, int *argc, char *argv[]) } load_remoting_plugin(ivi, ivi->config); - load_waltham_plugin(ivi, ivi->config); error: free(config.gbm_format); @@ -1962,9 +1869,6 @@ int wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_da if (ivi.remoting_api) ivi_enable_remote_outputs(&ivi); - if (ivi.waltham_transmitter_api) - ivi_enable_waltham_outputs(&ivi); - if (create_listening_socket(display, socket_name) < 0) goto error_compositor; diff --git a/src/desktop.c b/src/desktop.c index 340f14f..ed648c2 100644 --- a/src/desktop.c +++ b/src/desktop.c @@ -325,10 +325,6 @@ desktop_surface_removed(struct weston_desktop_surface *dsurface, void *userdata) if (ivi_seat && ivi_seat->focused_surface == wsurface) ivi_seat->focused_surface = NULL; - if (surface->role == IVI_SURFACE_ROLE_REMOTE && - output->type == OUTPUT_REMOTE) - ivi_destroy_waltham_destroy(surface); - /* check if there's a last 'remote' surface and insert a black * surface view if there's no background set for that output */ diff --git a/src/ivi-compositor.h b/src/ivi-compositor.h index 857b816..30b05e3 100644 --- a/src/ivi-compositor.h +++ b/src/ivi-compositor.h @@ -77,7 +77,6 @@ struct ivi_compositor { const struct weston_windowed_output_api *window_api; const struct weston_drm_output_api *drm_api; const struct weston_remoting_api *remoting_api; - const struct weston_transmitter_api *waltham_transmitter_api; struct wl_global *agl_shell; struct wl_global *agl_shell_desktop; @@ -135,9 +134,6 @@ struct ivi_surface; enum ivi_output_type { OUTPUT_LOCAL, OUTPUT_REMOTE, - /* same as remote but we need to signal the transmitter plug-in - * for the surfaces to have to be forwarded to those remoted outputs */ - OUTPUT_WALTHAM, }; struct ivi_output { @@ -269,13 +265,6 @@ enum ivi_surface_flags { IVI_SURFACE_PROP_POSITION = (1 << 1), }; -/* the waltham surface is a pointer type as well and - * in order to avoid adding ifdef for waltham use a - * generic pointer, which will be only be valid when the - * surface is a remote out on a waltham type of output */ -struct ivi_surface_waltham { - void *transmitter_surface; -}; struct ivi_surface { struct ivi_compositor *ivi; @@ -313,7 +302,6 @@ struct ivi_surface { struct ivi_remote_surface remote; }; - struct ivi_surface_waltham waltham_surface; struct wl_listener listener_advertise_app; struct wl_signal signal_advertise_app; }; @@ -473,9 +461,6 @@ void agl_shell_desktop_advertise_application_id(struct ivi_compositor *ivi, struct ivi_surface *surface); void -ivi_destroy_waltham_destroy(struct ivi_surface *surface); - -void ivi_check_pending_surface_desktop(struct ivi_surface *surface, enum ivi_surface_role *role); diff --git a/src/shell.c b/src/shell.c index 07a7e98..2f8a722 100644 --- a/src/shell.c +++ b/src/shell.c @@ -46,10 +46,6 @@ #include "agl-shell-server-protocol.h" #include "agl-shell-desktop-server-protocol.h" -#ifdef HAVE_WALTHAM -#include <waltham-transmitter/transmitter_api.h> -#endif - static void create_black_curtain_view(struct ivi_output *output); @@ -125,88 +121,6 @@ ivi_set_desktop_surface_fullscreen(struct ivi_surface *surface) agl_shell_desktop_advertise_application_id(ivi, surface); } -#ifdef HAVE_WALTHAM -void -ivi_destroy_waltham_destroy(struct ivi_surface *surface) -{ - struct ivi_compositor *ivi = surface->ivi; - const struct weston_transmitter_api *api = - ivi->waltham_transmitter_api; - - if (!api) - return; - - if (surface->waltham_surface.transmitter_surface) - api->surface_destroy(surface->waltham_surface.transmitter_surface); -} - -static void -ivi_output_notify_waltham_plugin(struct ivi_surface *surface) -{ - struct ivi_compositor *ivi = surface->ivi; - const struct weston_transmitter_api *api = ivi->waltham_transmitter_api; - struct weston_transmitter *transmitter; - struct weston_transmitter_remote *trans_remote; - struct weston_surface *weston_surface; - struct weston_output *woutput = surface->remote.output->output; - const char *app_id; - - if (!api) - return; - - transmitter = api->transmitter_get(ivi->compositor); - if (!transmitter) - return; - - trans_remote = api->get_transmitter_remote(woutput->name, transmitter); - if (!trans_remote) { - weston_log("Could not find a valie weston_transmitter_remote " - "that matches the output %s\n", woutput->name); - return; - } - - app_id = weston_desktop_surface_get_app_id(surface->dsurface); - weston_surface = - weston_desktop_surface_get_surface(surface->dsurface); - - weston_log("Forwarding app_id %s to remote %s\n", app_id, woutput->name); - - /* this will have the effect of informing the remote side to create a - * surface with the name app_id. W/ xdg-shell the following happens: - * - * compositor (server): - * surface_push_to_remote(): - * waltham-transmitter plug-in - * -> wthp_ivi_app_id_surface_create() - * - * client -- on the receiver side: - * -> wthp_ivi_app_id_surface_create() - * -> wth_receiver_weston_main() - * -> wl_compositor_create_surface() - * -> xdg_wm_base_get_xdg_surface - * -> xdg_toplevel_set_app_id() - * -> gst_init() - * -> gst_parse_launch() - * - * wth_receiver_weston_main() will be invoked from the handler of - * wthp_ivi_app_id_surface_create() and is responsible for setting-up - * the gstreamer pipeline as well. - */ - surface->waltham_surface.transmitter_surface = - api->surface_push_to_remote(weston_surface, app_id, trans_remote, NULL); -} - -#else -void -ivi_destroy_waltham_destroy(struct ivi_surface *surface) -{ -} -static void -ivi_output_notify_waltham_plugin(struct ivi_surface *surface) -{ -} -#endif - static void ivi_set_desktop_surface_remote(struct ivi_surface *surface) { @@ -227,9 +141,6 @@ ivi_set_desktop_surface_remote(struct ivi_surface *surface) if (view->is_mapped || view->surface->is_mapped) remove_black_curtain(output); - if (output->type == OUTPUT_WALTHAM) - ivi_output_notify_waltham_plugin(surface); - wl_list_insert(&ivi->surfaces, &surface->link); } |