Use the surfaceless platform in the headless backend to initialize the
GL-renderer and create pbuffer outputs. This allows headless backend to use
GL-renderer, even hardware accelerated.
This paves way for exercising GL-renderer in CI and using the Weston test suite
to test hardware GL ES implementations.
Relates to: https://gitlab.freedesktop.org/wayland/weston/issues/278
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
The backend headers are renamed from compositor-foo.h to backend-foo.h to
better describe their purpose. These headers are public libweston API for each
specific backend.
The headers will also be used like
#include <libweston/backend-drm.h>
instead of
#include <compositor-drm.h>
to give them a more explicit namespace.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
The main idea is to make libweston users use the form
#include <libweston/libweston.h>
instead of the plain
#include <compositor.h>
which is prone to name conflicts. This is reflected both in the installed
files, and the internal header search paths so that Weston would use the exact
same form as an external project using libweston would.
The public headers are moved under a new top-level directory include/ to make
them clearly stand out as special (public API).
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This is a complete port of the headless backend that
uses the recently added output handling API for output
configuration.
- Output can be configured at runtime by passing the
necessary configuration parameters, which can be
filled in manually, obtained from the configuration
file or obtained from the command line using
previously added functionality. It is required that
the scale and transform values are set using the
previously added functionality.
- Output can be created at runtime using the output
API. The output creation only creates a pending
output, which needs to be configured the same way as
mentioned above.
After everything has been set, output needs to be
enabled manually using weston_output_enable().
Same as before, a single output is created at runtime
using the default configuration or a configuration
parsed from the command line. The no-outputs
functionality is also preserved, which means that no
output will be created initially, but more outputs can
be added at runtime using the output API.
New feature:
This patch also adds, as a bonus of using shared
functionality, support for setting options for outputs
created by this backend in the weston config file in
addition to setting them from the command line.
v2:
- Fix wet_configure_windowed_output_from_config() usage.
- Call headless_output_disable() explicitly from
headless_output_destroy().
v3:
- Add scale support to output width and height.
- Use scaled values in calls to various functions which
require width and height.
- Disallow calling headless_output_configure more than once.
- Remove unneeded checks for output->name == NULL as that
has been disallowed.
- Use weston_compositor_add_pending_output().
- Bump weston_headless_backend_config version to 2.
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
This patch adds a new command line option which can be
used to tell headless backend not to create any
virtual outputs.
This will be used for output hotplug emulation, where
weston will start with no outputs available, and the
virtual output will be created at runtime.
v2:
- Use bool instead of int for the indicator flag
- Move final newspace to a separate line in command
line options
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
This clarifies what is supposed to be the libweston code.
v2: screen-share.c is already in compositor/ instead.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Tested-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
Acked-by: Benoit Gschwind <gschwind@gnu-log.net>
[Pekka: rebased]
refactor configuration API of headless-backend
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
v6:
- Define version number in the header
- Don't use leading underscores in header guards
- Add stub config_init_to_defaults()
- Allocate config on stack
- Drop unused display_name parameter
- Add error message when config is invalid
- Install compositor-headless.h and list it in headless-backend sources
v5:
- Update to current trunk
- Fixed typo 'struct weston_wayland_backend_config'
- Dropped unused variables
- Dropped weston_headless_backend_config_create() in favor of
directly zalloc'ing the object
- Dropped weston_headless_backend_load() in favor of the more
generalized load_backend_new().
- Dropped typedef from header
- Restored use of 'backend_init' entry point
- Backend_init() takes a base weston_backend_config object
- Renamed 'param' to 'config' in a few places for consistency
- Renamed 'headless_options' variable to 'options for consistency
- Version the base struct
- Free config on error
- Don't free config during backend_init normal operations
- Adjust header ordering
- Make header guard naming consistent with other headers
- Light reformatting for code style and consistency with other
backend config patches
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
[Pekka: rebased to apply before drm and x11 backends]
[Pekka: squashed in the headless part of "Enforce destruction of all
backend config objects after initialization"]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
weston-launch starts weston and provides mechanism
for weston to set/drop drm master, open a tty,
and read input devices without being root.
Execution is allowed for local-active sessions
or users in the group weston-launch.
This rename addresses a few problems around the split between core
Wayland and the wayland-demos repository.
1) Initially, we had one big repository with protocol code, sample
compositor and sample clients. We split that repository to make it
possible to implement the protocol without pulling in the sample/demo
code. At this point, the compositor is more than just a "demo" and
wayland-demos doesn't send the right message. The sample compositor
is a useful, self-contained project in it's own right, and we want to
move away from the "demos" label.
2) Another problem is that the wayland-demos compositor is often
called "the wayland compsitor", but it's really just one possible
compositor. Existing X11 compositors are expected to add Wayland
support and then gradually phase out/modularize the X11 support, for
example. Conversely, it's hard to talk about the wayland-demos
compositor specifically as opposed to, eg, the wayland protocol or a
wayland compositor in general.
We are also renaming the repo to weston, and the compositor
subdirectory to src/, to emphasize that the main "output" is the
compositor.
Besides the new header file, there's also a change in the main evdev creation
procedure for a more suggestive name (evdev_input_add_devices ->
evdev_input_create). There's no real functional changes in this commit.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>