On Sat, 27 Jun 2015 14:07:44 +0300 Giulio Camuffo <[email protected]> wrote:
> The backends used to have lots of code dealing with weston specific configs. > To allow them to be used by other compositors with their own configurations > remove all the usage of weston_config from the backends code and move it > in weston.c. The backends are now initialized with the new > weston_compositor_init_backend() function which takes a pointer to a > weston_backend_config struct. Each backend now installs one header where > a subclass of weston_backend_config is defined, and the compositor creates > an instance of the backend-specific config struct and passes it to > weston_compositor_init_backend(). > This means that the compositor now needs to know about all the backends > to be able to instantiate them, but no backend specific API such as xcb > or libdrm leaks through, so there are no new dependencies for the compositor. > > A backend may now set a vfunc pointer to create a new compositor. Not all do "Compositor" should probably be "output". > though, and use instead a callback function to configure a new output > that comes from below the compositor, instead of above it. I wrote some comments to an earlier thread here: http://lists.freedesktop.org/archives/wayland-devel/2015-July/023301.html That is my basis for evaluating this patch. > --- > Makefile.am | 21 ++ > src/compositor-drm.c | 163 +++++-------- > src/compositor-drm.h | 77 ++++++ > src/compositor-fbdev.c | 66 ++--- > src/compositor-fbdev.h | 58 +++++ > src/compositor-headless.c | 81 +++---- > src/compositor-headless.h | 47 ++++ > src/compositor-rdp.c | 57 +---- > src/compositor-rdp.h | 54 +++++ > src/compositor-rpi.c | 50 ++-- > src/compositor-rpi.h | 51 ++++ > src/compositor-wayland.c | 222 ++++------------- > src/compositor-wayland.h | 58 +++++ > src/compositor-x11.c | 166 ++++--------- > src/compositor-x11.h | 55 +++++ > src/compositor.c | 40 +++- > src/compositor.h | 20 +- > src/main.c | 599 > ++++++++++++++++++++++++++++++++++++++++++++-- > 18 files changed, 1283 insertions(+), 602 deletions(-) > create mode 100644 src/compositor-drm.h > create mode 100644 src/compositor-fbdev.h > create mode 100644 src/compositor-headless.h > create mode 100644 src/compositor-rdp.h > create mode 100644 src/compositor-rpi.h > create mode 100644 src/compositor-wayland.h > create mode 100644 src/compositor-x11.h This and the following patch "compositor: remove the weston_config field from weston_compositor" are doing a lot of things at once. I feel it is hard to see what is going on. I'll have a look if we could do the following patch series instead: - add config infra, but stubbed; everything still relies on weston_compositor::config - convert each backend at a time - convert each other config user at a time - remove weston_compositor::config as unused This way we can convert only the drm-backend at first and see how it looks like. Thanks, pq _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
