Commit Graph

9 Commits

Author SHA1 Message Date
Marius Vlad 3dc28308e6 libweston/color-management: Add fallback for static_assert
Attempt to fix the following with clang-18:

../weston-9999/libweston/color-management.c:890:2: error: call to
undeclared function 'static_assert'; ISO C99 and later do not support
implicit function declarations [-Wimplicit-function-declaration] 890 |
static_assert(UINT32_MAX <= SIZE_MAX, |         ^

Fixes: #948

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2024-08-29 16:20:47 +03:00
Joan Torres 1b793b7acd color: update color-management protocol to xx-v4
The main differences is the split of cm_surface functionality with
cm_surface and cm_feedback_surface.

There can only be one cm_surface to set, unset image descriptions. When
cm_surface is destroyed, the image description is automatically unset.

There can be multiple feedback_surfaces for one surface though.
Now the "preferred_changed" signal can be an initial event.

Creator params now have a new request: set_luminances.

Signed-off-by: Joan Torres <joan.torres@suse.com>
2024-08-07 13:36:49 +00:00
Leandro Ribeiro bcd76c372b libweston: fix indentation of a few files
Recently I accidentally created a few files using spaces instead of
tabs. This patch fixes that.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2024-06-04 17:32:39 -03:00
Leandro Ribeiro c10ca00e10 color: handle image description that are not ready
This patch is for our CM&HDR protocol extension implementation.

When a client requests to create an image description, it can only start
using that after receiving the 'ready' event. The compositor may take
the time it needs to create the backing color profile for such image
description. But nothing guarantees that clients will do the right
thing.

This fixes some issues for not well behaved clients and also documents
how we handle image description that are not ready.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2024-04-26 12:11:17 +00:00
Leandro Ribeiro 29e3af7ba2 color: handle image description whose creation gracefully failed
This patch is for our CM&HDR protocol extension implementation.

When we gracefully fail to create an image description, we send the
'failed' event and the client can only destroy such image description.
But nothing guarantees that clients will do the right thing.

This fixes some issues for not well behaved clients and also documents
how we handle image description whose creation gracefully failed
internally.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2024-04-26 12:11:17 +00:00
Leandro Ribeiro 4ee612253e color: explain why we don't unset surface image description
There's a comment with a TODO that would be super simple to implement,
but we preferred to wait at the moment. But there are discussions on the
upstream CM&HDR protocol MR that would change that. This patch documents
that.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2024-04-26 12:11:17 +00:00
Pekka Paalanen dcaff175b4 libweston: assert that color manager supports perceptual
This is required by the protocol spec.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-02-23 16:46:39 +02:00
Pekka Paalanen d9a7b3795a libweston: move color-management protocol init call to core
This reverts commit 188a3ebd5e.

Call weston_compositor_enable_color_management_protocol() after
compositor->color_manager has been set, and so allows to check if the
color manager supports the features mandatory in protocol. The check is
added in the next patch.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2024-02-23 16:46:39 +02:00
Leandro Ribeiro 5706d7e5d2 color: add support to the color-management protocol
In this MR we add support to the majority of the interfaces from the
color-management protocol.

That means that we are able to advertise output's images descriptions to
clients, preferred surface images descriptions, and so on. We also
support clients that wants to create ICC-based images descriptions and
set such descriptions for surfaces.

We still don't support the interface to allow clients to create
image descriptions from parameters, but that should be addressed
in the near future.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2024-02-14 11:15:35 -03:00