Essentially ensures that wet_output_set_eotf_mode() and
wet_output_set_colorimetry_mode() work as intended.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This makes it more explicit that this indeed is increasing the reference
count, rather than just returning a pointer.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This is preparation for the CM&HDR protocol implementation. It requires
us to give a unique id to each color-profile, so let's do that.
In this commit we introduce a generic id generator to libweston, and
its first user: the color-profile.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
In the following commits, we'll create the stock sRGB color profile for
outputs in weston_output_init(), and destroy it in
weston_output_release().
We already have a mock color manager in the tests, but we still need
to add the functions to create/destroy a mock stock sRGB color profile.
This should avoid crashes in the following commits.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
The color-metadata-errors test inits outputs with a NULL compositor, and
makes a compositor that's entirely 0s except for the bits it's interested
in.
This makes a mess in a future where the primary_plane is split up per
output, as initializing the primary plane tries to add it to the
compositor's plane_list.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
'color_characteristics_config_error' test ensures that all code paths in
parse_color_characteristics() and wet_output_set_color_characteristics()
get exercised. The return value and logged error messages are checked.
Other cases test the weston_hdr_metadata_type1 validation.
These are for the sake of test coverage, but also an example of how to
test a function from main.c, and how to capture messages from
weston_log().
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>