compositor: Implement output configuration using windowed_output_api
authorArmin Krezović <krezovic.armin@gmail.com>
Fri, 30 Sep 2016 12:11:04 +0000 (14:11 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 3 Oct 2016 10:51:24 +0000 (13:51 +0300)
commita3666d214fe02430a331c9819e9e33c986fe879f
tree27bc444f8a9c2199488d641a762926e381659612
parent4690c56abcfd601ade15c7d1a022267782491232
compositor: Implement output configuration using windowed_output_api

This implements output configuration for outputs which use
previously added weston_windowed_output_api. The function
takes an output that's to be configured, default configuration
that's to be set in case no configuration is specified in
the config file or on command line and optional third argument,
parsed_options, which will override defaults and options for
configuration if they are present.

This also introduces new compositor specific functions for
setting output's scale and transform from either hardcoded
default, config file option or command line option.

Pending output handling helpers have also been introduced.

v2:

 - Adapt to changes in previous patch.
 - Fix potential double free().
 - Remove redundant variables for scale and transform setting.
 - Drop parsed_options helper and parameter and use it directly
   in wet_configure_windowed_output_from_config().

v3:

 - Remove unneeded checks for output->name == NULL as that
   has been disallowed.
 - Stop printing mode if it's invalid, as it can be NULL.

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>
compositor/main.c