libweston: remove unused backend_init() arguments
Backends do not have access to command line elements nor weston_config anymore. They use the backend-specific config APIs now. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
This commit is contained in:
@@ -3214,8 +3214,6 @@ config_init_to_defaults(struct weston_drm_backend_config *config)
|
|||||||
|
|
||||||
WL_EXPORT int
|
WL_EXPORT int
|
||||||
backend_init(struct weston_compositor *compositor,
|
backend_init(struct weston_compositor *compositor,
|
||||||
int *argc, char *argv[],
|
|
||||||
struct weston_config *wc,
|
|
||||||
struct weston_backend_config *config_base)
|
struct weston_backend_config *config_base)
|
||||||
{
|
{
|
||||||
struct drm_backend *b;
|
struct drm_backend *b;
|
||||||
|
|||||||
@@ -729,8 +729,7 @@ fbdev_restore(struct weston_compositor *compositor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct fbdev_backend *
|
static struct fbdev_backend *
|
||||||
fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv[],
|
fbdev_backend_create(struct weston_compositor *compositor,
|
||||||
struct weston_config *config,
|
|
||||||
struct weston_fbdev_backend_config *param)
|
struct weston_fbdev_backend_config *param)
|
||||||
{
|
{
|
||||||
struct fbdev_backend *backend;
|
struct fbdev_backend *backend;
|
||||||
@@ -828,8 +827,7 @@ config_init_to_defaults(struct weston_fbdev_backend_config *config)
|
|||||||
}
|
}
|
||||||
|
|
||||||
WL_EXPORT int
|
WL_EXPORT int
|
||||||
backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
|
backend_init(struct weston_compositor *compositor,
|
||||||
struct weston_config *wc,
|
|
||||||
struct weston_backend_config *config_base)
|
struct weston_backend_config *config_base)
|
||||||
{
|
{
|
||||||
struct fbdev_backend *b;
|
struct fbdev_backend *b;
|
||||||
@@ -845,7 +843,7 @@ backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
|
|||||||
config_init_to_defaults(&config);
|
config_init_to_defaults(&config);
|
||||||
memcpy(&config, config_base, config_base->struct_size);
|
memcpy(&config, config_base, config_base->struct_size);
|
||||||
|
|
||||||
b = fbdev_backend_create(compositor, argc, argv, wc, &config);
|
b = fbdev_backend_create(compositor, &config);
|
||||||
if (b == NULL)
|
if (b == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -259,8 +259,6 @@ config_init_to_defaults(struct weston_headless_backend_config *config)
|
|||||||
|
|
||||||
WL_EXPORT int
|
WL_EXPORT int
|
||||||
backend_init(struct weston_compositor *compositor,
|
backend_init(struct weston_compositor *compositor,
|
||||||
int *argc, char *argv[],
|
|
||||||
struct weston_config *wc,
|
|
||||||
struct weston_backend_config *config_base)
|
struct weston_backend_config *config_base)
|
||||||
{
|
{
|
||||||
struct headless_backend *b;
|
struct headless_backend *b;
|
||||||
|
|||||||
@@ -1290,8 +1290,7 @@ config_init_to_defaults(struct weston_rdp_backend_config *config)
|
|||||||
}
|
}
|
||||||
|
|
||||||
WL_EXPORT int
|
WL_EXPORT int
|
||||||
backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
|
backend_init(struct weston_compositor *compositor,
|
||||||
struct weston_config *wconfig,
|
|
||||||
struct weston_backend_config *config_base)
|
struct weston_backend_config *config_base)
|
||||||
{
|
{
|
||||||
struct rdp_backend *b;
|
struct rdp_backend *b;
|
||||||
|
|||||||
@@ -2169,8 +2169,7 @@ fullscreen_binding(struct weston_keyboard *keyboard, uint32_t time,
|
|||||||
|
|
||||||
static struct wayland_backend *
|
static struct wayland_backend *
|
||||||
wayland_backend_create(struct weston_compositor *compositor,
|
wayland_backend_create(struct weston_compositor *compositor,
|
||||||
struct weston_wayland_backend_config *new_config,
|
struct weston_wayland_backend_config *new_config)
|
||||||
int *argc, char *argv[], struct weston_config *config)
|
|
||||||
{
|
{
|
||||||
struct wayland_backend *b;
|
struct wayland_backend *b;
|
||||||
struct wl_event_loop *loop;
|
struct wl_event_loop *loop;
|
||||||
@@ -2278,8 +2277,7 @@ config_init_to_defaults(struct weston_wayland_backend_config *config)
|
|||||||
}
|
}
|
||||||
|
|
||||||
WL_EXPORT int
|
WL_EXPORT int
|
||||||
backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
|
backend_init(struct weston_compositor *compositor,
|
||||||
struct weston_config *config,
|
|
||||||
struct weston_backend_config *config_base)
|
struct weston_backend_config *config_base)
|
||||||
{
|
{
|
||||||
struct wayland_backend *b;
|
struct wayland_backend *b;
|
||||||
@@ -2298,7 +2296,7 @@ backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
|
|||||||
config_init_to_defaults(&new_config);
|
config_init_to_defaults(&new_config);
|
||||||
memcpy(&new_config, config_base, config_base->struct_size);
|
memcpy(&new_config, config_base, config_base->struct_size);
|
||||||
|
|
||||||
b = wayland_backend_create(compositor, &new_config, argc, argv, config);
|
b = wayland_backend_create(compositor, &new_config);
|
||||||
|
|
||||||
if (!b)
|
if (!b)
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -1697,8 +1697,6 @@ config_init_to_defaults(struct weston_x11_backend_config *config)
|
|||||||
|
|
||||||
WL_EXPORT int
|
WL_EXPORT int
|
||||||
backend_init(struct weston_compositor *compositor,
|
backend_init(struct weston_compositor *compositor,
|
||||||
int *argc, char *argv[],
|
|
||||||
struct weston_config *wc,
|
|
||||||
struct weston_backend_config *config_base)
|
struct weston_backend_config *config_base)
|
||||||
{
|
{
|
||||||
struct x11_backend *b;
|
struct x11_backend *b;
|
||||||
|
|||||||
+1
-3
@@ -4885,13 +4885,11 @@ weston_compositor_load_backend(struct weston_compositor *compositor,
|
|||||||
struct weston_backend_config *config_base)
|
struct weston_backend_config *config_base)
|
||||||
{
|
{
|
||||||
int (*backend_init)(struct weston_compositor *c,
|
int (*backend_init)(struct weston_compositor *c,
|
||||||
int *argc, char *argv[],
|
|
||||||
struct weston_config *config,
|
|
||||||
struct weston_backend_config *config_base);
|
struct weston_backend_config *config_base);
|
||||||
|
|
||||||
backend_init = weston_load_module(backend, "backend_init");
|
backend_init = weston_load_module(backend, "backend_init");
|
||||||
if (!backend_init)
|
if (!backend_init)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return backend_init(compositor, NULL, NULL, NULL, config_base);
|
return backend_init(compositor, config_base);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1662,8 +1662,6 @@ noop_renderer_init(struct weston_compositor *ec);
|
|||||||
|
|
||||||
int
|
int
|
||||||
backend_init(struct weston_compositor *c,
|
backend_init(struct weston_compositor *c,
|
||||||
int *argc, char *argv[],
|
|
||||||
struct weston_config *config,
|
|
||||||
struct weston_backend_config *config_base);
|
struct weston_backend_config *config_base);
|
||||||
int
|
int
|
||||||
module_init(struct weston_compositor *compositor,
|
module_init(struct weston_compositor *compositor,
|
||||||
|
|||||||
Reference in New Issue
Block a user