[PATCH weston 3/5] libweston: remove unused backend_init() arguments

Pekka Paalanen ppaalanen at gmail.com
Fri Jun 3 12:41:14 UTC 2016


From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

Backends do not have access to command line elements nor weston_config
anymore. The use the backend-specific config APIs now.

Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
 src/compositor-drm.c      | 2 --
 src/compositor-fbdev.c    | 8 +++-----
 src/compositor-headless.c | 2 --
 src/compositor-rdp.c      | 3 +--
 src/compositor-wayland.c  | 8 +++-----
 src/compositor-x11.c      | 2 --
 src/compositor.c          | 5 +----
 src/compositor.h          | 2 --
 8 files changed, 8 insertions(+), 24 deletions(-)

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 39d061b..3356ae0 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -3214,8 +3214,6 @@ config_init_to_defaults(struct weston_drm_backend_config *config)
 
 WL_EXPORT int
 backend_init(struct weston_compositor *compositor,
-	     int *argc, char *argv[],
-	     struct weston_config *wc,
 	     struct weston_backend_config *config_base)
 {
 	struct drm_backend *b;
diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
index f66fe47..3f2347f 100644
--- a/src/compositor-fbdev.c
+++ b/src/compositor-fbdev.c
@@ -729,8 +729,7 @@ fbdev_restore(struct weston_compositor *compositor)
 }
 
 static struct fbdev_backend *
-fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv[],
-                     struct weston_config *config,
+fbdev_backend_create(struct weston_compositor *compositor,
                      struct weston_fbdev_backend_config *param)
 {
 	struct fbdev_backend *backend;
@@ -828,8 +827,7 @@ config_init_to_defaults(struct weston_fbdev_backend_config *config)
 }
 
 WL_EXPORT int
-backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
-	     struct weston_config *wc,
+backend_init(struct weston_compositor *compositor,
 	     struct weston_backend_config *config_base)
 {
 	struct fbdev_backend *b;
@@ -845,7 +843,7 @@ backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
 	config_init_to_defaults(&config);
 	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)
 		return -1;
 	return 0;
diff --git a/src/compositor-headless.c b/src/compositor-headless.c
index ed6c48c..45e47ca 100644
--- a/src/compositor-headless.c
+++ b/src/compositor-headless.c
@@ -259,8 +259,6 @@ config_init_to_defaults(struct weston_headless_backend_config *config)
 
 WL_EXPORT int
 backend_init(struct weston_compositor *compositor,
-	     int *argc, char *argv[],
-	     struct weston_config *wc,
 	     struct weston_backend_config *config_base)
 {
 	struct headless_backend *b;
diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c
index 4fc7c74..49d9f10 100644
--- a/src/compositor-rdp.c
+++ b/src/compositor-rdp.c
@@ -1290,8 +1290,7 @@ config_init_to_defaults(struct weston_rdp_backend_config *config)
 }
 
 WL_EXPORT int
-backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
-	     struct weston_config *wconfig,
+backend_init(struct weston_compositor *compositor,
 	     struct weston_backend_config *config_base)
 {
 	struct rdp_backend *b;
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index fe8b082..5b802f5 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -2169,8 +2169,7 @@ fullscreen_binding(struct weston_keyboard *keyboard, uint32_t time,
 
 static struct wayland_backend *
 wayland_backend_create(struct weston_compositor *compositor,
-		       struct weston_wayland_backend_config *new_config,
-		       int *argc, char *argv[], struct weston_config *config)
+		       struct weston_wayland_backend_config *new_config)
 {
 	struct wayland_backend *b;
 	struct wl_event_loop *loop;
@@ -2278,8 +2277,7 @@ config_init_to_defaults(struct weston_wayland_backend_config *config)
 }
 
 WL_EXPORT int
-backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
-	     struct weston_config *config,
+backend_init(struct weston_compositor *compositor,
 	     struct weston_backend_config *config_base)
 {
 	struct wayland_backend *b;
@@ -2298,7 +2296,7 @@ backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
 	config_init_to_defaults(&new_config);
 	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)
 		return -1;
diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index 629b5f3..5e46e68 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -1697,8 +1697,6 @@ config_init_to_defaults(struct weston_x11_backend_config *config)
 
 WL_EXPORT int
 backend_init(struct weston_compositor *compositor,
-	     int *argc, char *argv[],
-	     struct weston_config *wc,
 	     struct weston_backend_config *config_base)
 {
 	struct x11_backend *b;
diff --git a/src/compositor.c b/src/compositor.c
index 8ecc8d2..07874f6 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -4885,14 +4885,11 @@ weston_compositor_load_backend(struct weston_compositor *compositor,
 			       struct weston_backend_config *config_base)
 {
 	int (*backend_init)(struct weston_compositor *c,
-			    int *argc, char *argv[],
-			    struct weston_config *config,
 			    struct weston_backend_config *config_base);
 
 	backend_init = weston_load_module(backend, "backend_init");
 	if (!backend_init)
 		return -1;
 
-	return backend_init(compositor, NULL, NULL, NULL, config_base);
+	return backend_init(compositor, config_base);
 }
-
diff --git a/src/compositor.h b/src/compositor.h
index bec0112..25407a2 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -1662,8 +1662,6 @@ noop_renderer_init(struct weston_compositor *ec);
 
 int
 backend_init(struct weston_compositor *c,
-	     int *argc, char *argv[],
-	     struct weston_config *config,
 	     struct weston_backend_config *config_base);
 int
 module_init(struct weston_compositor *compositor,
-- 
2.7.3



More information about the wayland-devel mailing list