weston: migrate fbdev to head-based output API

Migrate the fbdev frontend to use the new head-based output
configuration API: listen for heads_changed, and process all heads.

v7:
- remove unnecessary 'goto out' in load_fbdev_backend()

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Ian Ray <ian.ray@ge.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Derek Foreman <derekf@osg.samsung.com>
dev
Pekka Paalanen 7 years ago
parent 46e2f02449
commit 33961bd78e
  1. 15
      compositor/main.c

@ -1487,10 +1487,9 @@ out:
return ret; return ret;
} }
static void static int
fbdev_backend_output_configure(struct wl_listener *listener, void *data) 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 *wc = wet_get_config(output->compositor);
struct weston_config_section *section; struct weston_config_section *section;
@ -1499,7 +1498,7 @@ fbdev_backend_output_configure(struct wl_listener *listener, void *data)
wet_output_set_transform(output, section, WL_OUTPUT_TRANSFORM_NORMAL, UINT32_MAX); wet_output_set_transform(output, section, WL_OUTPUT_TRANSFORM_NORMAL, UINT32_MAX);
weston_output_set_scale(output, 1); weston_output_set_scale(output, 1);
weston_output_enable(output); return 0;
} }
static int static int
@ -1523,16 +1522,12 @@ load_fbdev_backend(struct weston_compositor *c,
config.base.struct_size = sizeof(struct weston_fbdev_backend_config); config.base.struct_size = sizeof(struct weston_fbdev_backend_config);
config.configure_device = configure_input_device; config.configure_device = configure_input_device;
wet_set_simple_head_configurator(c, fbdev_backend_output_configure);
/* load the actual wayland backend and configure it */ /* load the actual wayland backend and configure it */
ret = weston_compositor_load_backend(c, WESTON_BACKEND_FBDEV, ret = weston_compositor_load_backend(c, WESTON_BACKEND_FBDEV,
&config.base); &config.base);
if (ret < 0)
goto out;
wet_set_pending_output_handler(c, fbdev_backend_output_configure);
out:
free(config.device); free(config.device);
return ret; return ret;
} }

Loading…
Cancel
Save