[PATCH 00/10] New output configuration API

Armin Krezović krezovic.armin at gmail.com
Thu Aug 11 15:33:55 UTC 2016


Hello everyone,

As part of my GSoC related work, I need to implement output layout
configuration using configuration file. But, before I could do
that, Pekka recommended that I rework current output configuration
code and move all output configuration outside of libweston and make
it available as the public API.

This series implements output configuration using recently added
plugin-registry, since different backend use different configuration
options.

The following features are now available:

- When a specific backend creates an output, it sends a signal to
  libweston user that an output needs configuration, and libweston
  user can choose whether an output should be configured and how
  it will be configured. This also enables creating output
  configuration dialogs. After the configuration is done, an output
  needs to be enabled explicitly. Some configuration is still limited
  to an output that isn't enabled.

- An output can be disabled at any time and reconfigured if necessary.

- For backends that don't use physical outputs ("windowed" and headless
  backends), a new output can be created at runtime if desired.

- Backend agonistic functions for setting output scale and transform
  were introduced and can be used to set output's scale and transform.
  Compositor specific wrappers were also introduced to ease setting
  output scale and transform from weston's config file.

- Each backend has been individually ported to support new output
  configuration. The following plugin API's are now exported
  depending on the backend that's used.

  - headless, wayland (windowed) and x11 backends use
    weston_windowed_output_api which supports configuring an output
    with desired width and height, as well as creating a new output
    with a desired name.

  - drm backend uses weston_drm_output_api, which supports setting
    drm mode, gbm format and seat id.

  - fbdev backend doesn't use any configuration API as it can't be
    configured. It supports setting scale and transform and can
    be enabled or disabled at any time.

  - rdp backend uses weston_rdp_output_api, which works as a subset
    of weston_windowed_output_api, but it can't create a new output
    at will.

  - wayland backend on fullscreen shell or with sprawl enabled uses
    weston_wayland_output_api, because in such conditions an
    output can only be configured (but configuration is limited)
    and new outputs are created as new screens appear.

Armin Krezović (10):
  libweston: Add more functionality for handling weston_output objects
  libweston: Add initial output API for windowed outputs configuration
  compositor: Implement output configuration using windowed_output_api
  weston: Port DRM backend to new output handling API
  weston: Port fbdev backend to new output handling API
  weston: Port headless backend to new output handling API
  weston: Port RDP backend to new output handling API
  weston: Port Wayland backend to new output handling API
  weston: Port X11 backend to new output handling API
  Cleanup unneeded stuff left during the porting phrase

 Makefile.am                     |   1 +
 compositor/main.c               | 823 +++++++++++++++++++++++++---------------
 libweston/compositor-drm.c      | 429 ++++++++++++---------
 libweston/compositor-drm.h      |  42 +-
 libweston/compositor-fbdev.c    |  87 +++--
 libweston/compositor-fbdev.h    |   2 -
 libweston/compositor-headless.c | 146 ++++---
 libweston/compositor-headless.h |   6 -
 libweston/compositor-rdp.c      | 132 +++++--
 libweston/compositor-rdp.h      |  20 +-
 libweston/compositor-wayland.c  | 351 +++++++++--------
 libweston/compositor-wayland.h  |  22 +-
 libweston/compositor-x11.c      | 277 +++++++-------
 libweston/compositor-x11.h      |  11 -
 libweston/compositor.c          | 388 +++++++++++++++----
 libweston/compositor.h          |  47 ++-
 libweston/output-api.h          |  88 +++++
 17 files changed, 1846 insertions(+), 1026 deletions(-)
 create mode 100644 libweston/output-api.h

-- 
2.9.2



More information about the wayland-devel mailing list