tests: add color-management tests for the parametric interface

This adds tests to create image descriptions through color parameters
using the CM&HDR protocol extension.

The code for that was added in commit "color: allow clients to create
image description from parameters".

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
Leandro Ribeiro 2024-03-28 19:21:19 -03:00 committed by Pekka Paalanen
parent 70ad4cd901
commit c01a1f7c64
3 changed files with 1167 additions and 2 deletions

View file

@ -525,8 +525,18 @@ weston_color_manager_create(struct weston_compositor *compositor)
(1 << WESTON_PRIMARIES_CICP_DISPLAY_P3) |
(1 << WESTON_PRIMARIES_ADOBE_RGB);
/* We still don't support any tf named. */
cm->base.supported_tf_named = 0;
/**
* TODO: this is a lie just to make the color-management-parametric
* tests to work. Without this the tests would be much more limited. We
* actually need to implement such TF's. There's no problem doing that,
* as parametric color profiles themselves are still unsupported.
*/
/* We need to implement each tf, and we support only a few of them. */
cm->base.supported_tf_named = (1 << WESTON_TF_GAMMA22) |
(1 << WESTON_TF_GAMMA28) |
(1 << WESTON_TF_SRGB) |
(1 << WESTON_TF_ST2084_PQ);
wl_list_init(&cm->color_transform_list);
wl_list_init(&cm->color_profile_list);

File diff suppressed because it is too large Load diff

View file

@ -311,6 +311,13 @@ if get_option('color-management-lcms')
],
'dep_objs': [ dep_lcms_util ]
},
{ 'name': 'color-management-parametric',
'sources': [
'color-management-parametric-test.c',
color_management_v1_client_protocol_h,
color_management_v1_protocol_c,
],
},
{ 'name': 'color-metadata-parsing' },
{
'name': 'lcms-util',