mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-06 12:38:03 +02:00
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>
This commit is contained in:
parent
e3c0d8af43
commit
93daabbc71
9 changed files with 19 additions and 10 deletions
|
|
@ -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, };
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue