diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2021-05-11 17:22:50 +0200 |
---|---|---|
committer | Pekka Paalanen <pq@iki.fi> | 2022-06-10 09:27:43 +0000 |
commit | aab722bb178584e418eb777392773e36f4647c2e (patch) | |
tree | aa87d51da27838daa8400357fce09c93c257936f /remoting | |
parent | 54d7682ee844e8bdb2fe9fe9ad445eab30a82999 (diff) | |
download | weston-aab722bb178584e418eb777392773e36f4647c2e.tar.gz |
backend-drm: prepare virtual output API for heterogeneous outputs
Stop plugins from overwriting the struct weston_output::destroy vfunc,
as that will be used by backends to recognize their outputs.
Instead, pass a plugin-specific destroy callback when creating the
virtual output.
See: https://gitlab.freedesktop.org/wayland/weston/-/issues/268
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/remoting-plugin.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/remoting/remoting-plugin.c b/remoting/remoting-plugin.c index 7d1d00f4..0af43b5b 100644 --- a/remoting/remoting-plugin.c +++ b/remoting/remoting-plugin.c @@ -95,7 +95,6 @@ static const struct remoted_output_support_gbm_format supported_formats[] = { struct remoted_output { struct weston_output *output; - void (*saved_destroy)(struct weston_output *output); int (*saved_enable)(struct weston_output *output); int (*saved_disable)(struct weston_output *output); int (*saved_start_repaint_loop)(struct weston_output *output); @@ -642,8 +641,6 @@ remoting_output_destroy(struct weston_output *output) free(mode); } - remoted_output->saved_destroy(output); - remoting_gst_pipeline_deinit(remoted_output); remoting_gstpipe_release(&remoted_output->gstpipe); @@ -763,14 +760,12 @@ remoting_output_create(struct weston_compositor *c, char *name) goto err; } - output->output = api->create_output(c, name); + output->output = api->create_output(c, name, remoting_output_destroy); if (!output->output) { weston_log("Can not create virtual output\n"); goto err; } - output->saved_destroy = output->output->destroy; - output->output->destroy = remoting_output_destroy; output->saved_enable = output->output->enable; output->output->enable = remoting_output_enable; output->saved_disable = output->output->disable; |