EXT: [PATCH weston v6 22/73] weston: migrate fbdev to head-based output API
Ray, Ian (GE Healthcare)
ian.ray at ge.com
Fri Mar 23 13:25:52 UTC 2018
> On 16 Feb 2018, at 16.57, Pekka Paalanen <ppaalanen at gmail.com> wrote:
>
> From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
>
> Migrate the fbdev frontend to use the new head-based output
> configuration API: listen for heads_changed, and process all heads.
>
> Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> ---
> compositor/main.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/compositor/main.c b/compositor/main.c
> index 873f7a3a..3905c3ba 100644
> --- a/compositor/main.c
> +++ b/compositor/main.c
> @@ -1481,10 +1481,9 @@ out:
> return ret;
> }
>
> -static void
> -fbdev_backend_output_configure(struct wl_listener *listener, void *data)
> +static int
> +fbdev_backend_output_configure(struct weston_output *output)
> {
> - struct weston_output *output = data;
> struct weston_config *wc = wet_get_config(output->compositor);
> struct weston_config_section *section;
>
> @@ -1493,7 +1492,7 @@ fbdev_backend_output_configure(struct wl_listener *listener, void *data)
> wet_output_set_transform(output, section, WL_OUTPUT_TRANSFORM_NORMAL, UINT32_MAX);
> weston_output_set_scale(output, 1);
>
> - weston_output_enable(output);
> + return 0;
> }
>
> static int
> @@ -1517,6 +1516,8 @@ load_fbdev_backend(struct weston_compositor *c,
> config.base.struct_size = sizeof(struct weston_fbdev_backend_config);
> config.configure_device = configure_input_device;
>
> + wet_set_simple_head_configurator(c, fbdev_backend_output_configure);
> +
> /* load the actual wayland backend and configure it */
> ret = weston_compositor_load_backend(c, WESTON_BACKEND_FBDEV,
> &config.base);
> @@ -1524,8 +1525,6 @@ load_fbdev_backend(struct weston_compositor *c,
> if (ret < 0)
> goto out;
>
Nit: goto out is now redundant.
> - wet_set_pending_output_handler(c, fbdev_backend_output_configure);
> -
> out:
> free(config.device);
> return ret;
> --
> 2.13.6
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list