libweston: add struct weston_output_color_outcome
This new struct collects all the things that a color manager needs to set up when any colorimetry aspect of an output changes. The intention is to make the color manager API less verbose. In this first step, the new struct is added and replaces the fields in weston_output. The intention is for the following color manager API changes to dynamically allocate this structure. Unfortunately, until that actually happens, we need a temporary way to allocate it. That is weston_output::colorout_, which will be removed in the next patch. This keeps the patches more palatable for review at the cost of some back-and-forth in code changes. This is a pure refactoring, no functional changes. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
committed by
Pekka Paalanen
parent
6122765203
commit
6c0524fd80
@@ -283,6 +283,26 @@ struct weston_head {
|
||||
enum weston_hdcp_protection current_protection;
|
||||
};
|
||||
|
||||
/** Output properties derived from its color characteristics and profile
|
||||
*
|
||||
* These are constructed by a color manager.
|
||||
*
|
||||
* A weston_output_color_outcome owns (a reference to) everything it contains.
|
||||
*
|
||||
* \ingroup output
|
||||
* \internal
|
||||
*/
|
||||
struct weston_output_color_outcome {
|
||||
/** sRGB to output color space transformation */
|
||||
struct weston_color_transform *from_sRGB_to_output;
|
||||
|
||||
/** sRGB to blending color space transformation */
|
||||
struct weston_color_transform *from_sRGB_to_blend;
|
||||
|
||||
/** Blending to output color space transformation */
|
||||
struct weston_color_transform *from_blend_to_output;
|
||||
};
|
||||
|
||||
/** Content producer for heads
|
||||
*
|
||||
* \rst
|
||||
@@ -392,12 +412,14 @@ struct weston_output {
|
||||
int scale;
|
||||
|
||||
struct weston_color_profile *color_profile;
|
||||
struct weston_color_transform *from_sRGB_to_output;
|
||||
struct weston_color_transform *from_sRGB_to_blend;
|
||||
struct weston_color_transform *from_blend_to_output;
|
||||
bool from_blend_to_output_by_backend;
|
||||
enum weston_eotf_mode eotf_mode;
|
||||
|
||||
/* XXX: temporary allocation to be removed in the next commit */
|
||||
struct weston_output_color_outcome colorout_;
|
||||
|
||||
struct weston_output_color_outcome *color_outcome;
|
||||
|
||||
int (*enable)(struct weston_output *output);
|
||||
int (*disable)(struct weston_output *output);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user