Commit graph

6 commits

Author SHA1 Message Date
Armin Krezović 4008740d5e weston: Rename weston_output_init_pending() to weston_output_init()
v2:

 - Rebased for latest changes.

v3:

 - Rebased for changes in wayland backend.

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>
2016-10-05 14:59:09 +03:00
Armin Krezović 7fb17756fc weston: Port headless backend to new output handling API
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>
2016-10-03 14:24:08 +03:00
Armin Krezović a8fb5eaa4e compositor-headless: Use non-cast functions to retrieve backend and output objects
This uses container_of instead of explicit cast to retrieve
backend and output objects from generic weston_backend and
weston_output pointers.

Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-08-05 16:40:05 +03:00
Jussi Kukkonen 649bbce607 include stdint.h for int32_t/uint32_t
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-07-26 16:26:08 -07:00
Armin Krezović d84deeb173 compositor-headless: Support starting with zero outputs
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>
2016-06-27 13:17:05 +03:00
Pekka Paalanen b5e3ea218b Rename src/ to libweston/
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]
2016-06-23 17:44:54 +03:00
Renamed from src/compositor-headless.c (Browse further)