diff options
author | Giulio Camuffo <giuliocamuffo@gmail.com> | 2015-10-17 19:24:14 +0300 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2015-10-23 15:23:37 -0700 |
commit | 93daabbc7141de3c085278ab8905813038308209 (patch) | |
tree | 3dc7e928a0cebe05514f10a6eeaf97aa98b90141 | |
parent | e3c0d8af43272eb31f16b535ab821fd98399e8fa (diff) | |
download | weston-93daabbc7141de3c085278ab8905813038308209.tar.gz |
compositor: pass the backend config struct to the backends init function
Add new configuration argument to the backend_init() function, which
will replace the current argc, argv, and config arguments.
After each backend is converted individually the unused parameters
will be removed.
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
-rw-r--r-- | src/compositor-drm.c | 3 | ||||
-rw-r--r-- | src/compositor-fbdev.c | 3 | ||||
-rw-r--r-- | src/compositor-headless.c | 3 | ||||
-rw-r--r-- | src/compositor-rdp.c | 3 | ||||
-rw-r--r-- | src/compositor-rpi.c | 3 | ||||
-rw-r--r-- | src/compositor-wayland.c | 3 | ||||
-rw-r--r-- | src/compositor-x11.c | 3 | ||||
-rw-r--r-- | src/compositor.h | 3 | ||||
-rw-r--r-- | src/main.c | 5 |
9 files changed, 19 insertions, 10 deletions
diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 36c3b3e0..41f9a821 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -3238,7 +3238,8 @@ err_base: WL_EXPORT int backend_init(struct weston_compositor *compositor, int *argc, char *argv[], - struct weston_config *config) + struct weston_config *config, + struct weston_backend_config *config_base) { struct drm_backend *b; struct drm_parameters param = { 0, }; diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c index 7465df6d..57c54c20 100644 --- a/src/compositor-fbdev.c +++ b/src/compositor-fbdev.c @@ -904,7 +904,8 @@ out_compositor: WL_EXPORT int backend_init(struct weston_compositor *compositor, int *argc, char *argv[], - struct weston_config *config) + struct weston_config *config, + struct weston_backend_config *config_base) { struct fbdev_backend *b; /* TODO: Ideally, available frame buffers should be enumerated using diff --git a/src/compositor-headless.c b/src/compositor-headless.c index dba21a60..ba0d8d7c 100644 --- a/src/compositor-headless.c +++ b/src/compositor-headless.c @@ -260,7 +260,8 @@ err_free: WL_EXPORT int backend_init(struct weston_compositor *compositor, int *argc, char *argv[], - struct weston_config *config) + struct weston_config *config, + struct weston_backend_config *config_base) { int width = 1024, height = 640; char *display_name = NULL; diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c index 7272f415..1098f010 100644 --- a/src/compositor-rdp.c +++ b/src/compositor-rdp.c @@ -1269,7 +1269,8 @@ err_free_strings: WL_EXPORT int backend_init(struct weston_compositor *compositor, int *argc, char *argv[], - struct weston_config *wconfig) + struct weston_config *wconfig, + struct weston_backend_config *config_base) { struct rdp_backend *b; struct rdp_backend_config config; diff --git a/src/compositor-rpi.c b/src/compositor-rpi.c index 83c01b46..4d7ea7b0 100644 --- a/src/compositor-rpi.c +++ b/src/compositor-rpi.c @@ -555,7 +555,8 @@ out_compositor: WL_EXPORT int backend_init(struct weston_compositor *compositor, int *argc, char *argv[], - struct weston_config *config) + struct weston_config *config, + struct weston_backend_config *config_base) { const char *transform = "normal"; struct rpi_backend *b; diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c index 7b11ae48..a819867d 100644 --- a/src/compositor-wayland.c +++ b/src/compositor-wayland.c @@ -2056,7 +2056,8 @@ wayland_backend_destroy(struct wayland_backend *b) WL_EXPORT int backend_init(struct weston_compositor *compositor, int *argc, char *argv[], - struct weston_config *config) + struct weston_config *config, + struct weston_backend_config *config_base) { struct wayland_backend *b; struct wayland_output *output; diff --git a/src/compositor-x11.c b/src/compositor-x11.c index 9a239969..ccb78673 100644 --- a/src/compositor-x11.c +++ b/src/compositor-x11.c @@ -1701,7 +1701,8 @@ err_free: WL_EXPORT int backend_init(struct weston_compositor *compositor, int *argc, char *argv[], - struct weston_config *config) + struct weston_config *config, + struct weston_backend_config *config_base) { struct x11_backend *b; int fullscreen = 0; diff --git a/src/compositor.h b/src/compositor.h index 172de6f3..6bb6222d 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -1599,7 +1599,8 @@ noop_renderer_init(struct weston_compositor *ec); int backend_init(struct weston_compositor *c, int *argc, char *argv[], - struct weston_config *config); + struct weston_config *config, + struct weston_backend_config *config_base); int module_init(struct weston_compositor *compositor, int *argc, char *argv[]); @@ -640,7 +640,8 @@ int main(int argc, char *argv[]) struct wl_event_loop *loop; int (*backend_init)(struct weston_compositor *c, int *argc, char *argv[], - struct weston_config *config); + struct weston_config *config, + struct weston_backend_config *config_base); int i, fd; char *backend = NULL; char *shell = NULL; @@ -739,7 +740,7 @@ int main(int argc, char *argv[]) if (weston_compositor_init_config(ec, config) < 0) goto out; - if (backend_init(ec, &argc, argv, config) < 0) { + if (backend_init(ec, &argc, argv, config, NULL) < 0) { weston_log("fatal: failed to create compositor backend\n"); goto out; } |