Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Libweston v2 #1

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Libweston v2 #1

wants to merge 12 commits into from

Conversation

giucam
Copy link
Owner

@giucam giucam commented Jun 11, 2015

No description provided.

@giucam giucam force-pushed the libweston-v2 branch 3 times, most recently from 504022e to d6c5d1e Compare June 13, 2015 09:46
@giucam giucam force-pushed the libweston-v2 branch 20 times, most recently from 9fc8c2a to d060942 Compare June 27, 2015 10:08
giucam added 4 commits July 9, 2015 15:53
This is a preliminary change for libweston, with no functional modifications.
Separate the backends and the core weston_compositor struct, by creating
the weston_compositor in the main(), and having the various backends extend
the weston_backend struct, an instance of which is returned by the backend
entry point.
This enable us to logically separate the compositor core from the backend,
allowing the core to be extended without messing with the backends.
This commit adds three new exported functions:
- weston_compositor_create() returns a new weston_compositor instance,
initializing it as the now removed weston_compositor_init() did.
- weston_compositor_exit(compositor) asks the compositor to tear
down by calling the compositor's exit vfunc which is set by the
libweston application.
- weston_compositor_destroy(compositor) is called by the libweston
application when tearing down the compositor. The compositor is destroyed
and the memory freed.
This commits starts to separate the libweston code from the weston
specific code. As such, the main() is moved, together with signals
handling and configuration handling.
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
though, and use instead a callback function to configure a new output
that comes from below the compositor, instead of above it.
giucam added 8 commits July 9, 2015 15:54
Instead of the central weston_config pointer we now store it in some
module-specific pointers. This way we can remove them one by one.
The library is versioned, so a -N is appended to its name, e.g. libweston-1.so.
The same is done for the pc file, the include and lib/weston dirs.
This allows multiple libweston versions to be installed together.
Additionally, a new libweston.pc is introduced in paraller with weston.pc,
which is used when building a Weston plugin.
libweston still used those functions internally, so it was not linkable
yet by other compositors.
Move the code launching the screenshooter client and implementing
the screenshot protocol out of libweston, and make screenshooter.c
a generic way to hook screenshoot protocols into weston.
A new header weston.h is added, with an entry point for the shells
to init the screenshooter.
It uses the weston_client_launch API, which is not available in
libweston.
the --enable/disable-weston-binaries enables or disables the creation
of 'weston', 'weston-launch' and all the binaries that are
installed in $prefix/lib/libexec. This allows, together with
--enable-clients, to only build the libraries, making possible to
build and install different libweston versions at the same time.
@keithbowes
Copy link

That's still pretty ancient, not even supporting xdg-shell-unstable-v6, let alone xdg-shell-stable required by an increasing amount of programs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants