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:
committed by
Bryce Harrington
parent
e3c0d8af43
commit
93daabbc71
@@ -3238,7 +3238,8 @@ err_base:
|
|||||||
|
|
||||||
WL_EXPORT int
|
WL_EXPORT int
|
||||||
backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
|
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_backend *b;
|
||||||
struct drm_parameters param = { 0, };
|
struct drm_parameters param = { 0, };
|
||||||
|
|||||||
@@ -904,7 +904,8 @@ out_compositor:
|
|||||||
|
|
||||||
WL_EXPORT int
|
WL_EXPORT int
|
||||||
backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
|
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;
|
struct fbdev_backend *b;
|
||||||
/* TODO: Ideally, available frame buffers should be enumerated using
|
/* TODO: Ideally, available frame buffers should be enumerated using
|
||||||
|
|||||||
@@ -260,7 +260,8 @@ err_free:
|
|||||||
WL_EXPORT int
|
WL_EXPORT int
|
||||||
backend_init(struct weston_compositor *compositor,
|
backend_init(struct weston_compositor *compositor,
|
||||||
int *argc, char *argv[],
|
int *argc, char *argv[],
|
||||||
struct weston_config *config)
|
struct weston_config *config,
|
||||||
|
struct weston_backend_config *config_base)
|
||||||
{
|
{
|
||||||
int width = 1024, height = 640;
|
int width = 1024, height = 640;
|
||||||
char *display_name = NULL;
|
char *display_name = NULL;
|
||||||
|
|||||||
@@ -1269,7 +1269,8 @@ err_free_strings:
|
|||||||
|
|
||||||
WL_EXPORT int
|
WL_EXPORT int
|
||||||
backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
|
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 *b;
|
||||||
struct rdp_backend_config config;
|
struct rdp_backend_config config;
|
||||||
|
|||||||
@@ -555,7 +555,8 @@ out_compositor:
|
|||||||
WL_EXPORT int
|
WL_EXPORT int
|
||||||
backend_init(struct weston_compositor *compositor,
|
backend_init(struct weston_compositor *compositor,
|
||||||
int *argc, char *argv[],
|
int *argc, char *argv[],
|
||||||
struct weston_config *config)
|
struct weston_config *config,
|
||||||
|
struct weston_backend_config *config_base)
|
||||||
{
|
{
|
||||||
const char *transform = "normal";
|
const char *transform = "normal";
|
||||||
struct rpi_backend *b;
|
struct rpi_backend *b;
|
||||||
|
|||||||
@@ -2056,7 +2056,8 @@ wayland_backend_destroy(struct wayland_backend *b)
|
|||||||
|
|
||||||
WL_EXPORT int
|
WL_EXPORT int
|
||||||
backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
|
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_backend *b;
|
||||||
struct wayland_output *output;
|
struct wayland_output *output;
|
||||||
|
|||||||
@@ -1701,7 +1701,8 @@ err_free:
|
|||||||
|
|
||||||
WL_EXPORT int
|
WL_EXPORT int
|
||||||
backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
|
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;
|
struct x11_backend *b;
|
||||||
int fullscreen = 0;
|
int fullscreen = 0;
|
||||||
|
|||||||
+2
-1
@@ -1599,7 +1599,8 @@ 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[],
|
int *argc, char *argv[],
|
||||||
struct weston_config *config);
|
struct weston_config *config,
|
||||||
|
struct weston_backend_config *config_base);
|
||||||
int
|
int
|
||||||
module_init(struct weston_compositor *compositor,
|
module_init(struct weston_compositor *compositor,
|
||||||
int *argc, char *argv[]);
|
int *argc, char *argv[]);
|
||||||
|
|||||||
+3
-2
@@ -640,7 +640,8 @@ int main(int argc, char *argv[])
|
|||||||
struct wl_event_loop *loop;
|
struct wl_event_loop *loop;
|
||||||
int (*backend_init)(struct weston_compositor *c,
|
int (*backend_init)(struct weston_compositor *c,
|
||||||
int *argc, char *argv[],
|
int *argc, char *argv[],
|
||||||
struct weston_config *config);
|
struct weston_config *config,
|
||||||
|
struct weston_backend_config *config_base);
|
||||||
int i, fd;
|
int i, fd;
|
||||||
char *backend = NULL;
|
char *backend = NULL;
|
||||||
char *shell = NULL;
|
char *shell = NULL;
|
||||||
@@ -739,7 +740,7 @@ int main(int argc, char *argv[])
|
|||||||
if (weston_compositor_init_config(ec, config) < 0)
|
if (weston_compositor_init_config(ec, config) < 0)
|
||||||
goto out;
|
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");
|
weston_log("fatal: failed to create compositor backend\n");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user