mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-13 08:22:16 -04:00
color_management_v1: implement set_luminances
v2: Fix coding errors v3: Fall back to default luminances if not set v4: Return luminances, with override max for PQ
This commit is contained in:
parent
fd870f6d27
commit
5994c3d055
5 changed files with 86 additions and 8 deletions
|
|
@ -29,6 +29,9 @@ struct wlr_image_description_v1_data {
|
|||
float min, max; // cd/m²
|
||||
} mastering_luminance;
|
||||
|
||||
bool has_luminances;
|
||||
struct wlr_color_luminances luminances; // cd/m²
|
||||
|
||||
uint32_t max_cll, max_fall; // cd/m², zero if unset
|
||||
};
|
||||
|
||||
|
|
@ -94,6 +97,9 @@ void wlr_color_manager_v1_set_surface_preferred_image_description(
|
|||
struct wlr_color_manager_v1 *manager, struct wlr_surface *surface,
|
||||
const struct wlr_image_description_v1_data *data);
|
||||
|
||||
void wlr_color_manager_v1_get_luminances(const struct wlr_image_description_v1_data *img_desc,
|
||||
struct wlr_color_luminances *lum);
|
||||
|
||||
/**
|
||||
* Convert a protocol transfer function to enum wlr_color_transfer_function.
|
||||
* Aborts if there is no matching wlroots entry.
|
||||
|
|
|
|||
|
|
@ -196,6 +196,9 @@ struct wlr_scene_buffer {
|
|||
enum wlr_color_encoding color_encoding;
|
||||
enum wlr_color_range color_range;
|
||||
|
||||
bool has_luminances;
|
||||
struct wlr_color_luminances luminances;
|
||||
|
||||
struct {
|
||||
uint64_t active_outputs;
|
||||
struct wlr_texture *texture;
|
||||
|
|
@ -570,6 +573,9 @@ void wlr_scene_buffer_set_color_encoding(struct wlr_scene_buffer *scene_buffer,
|
|||
void wlr_scene_buffer_set_color_range(struct wlr_scene_buffer *scene_buffer,
|
||||
enum wlr_color_range range);
|
||||
|
||||
void wlr_scene_buffer_set_luminances(struct wlr_scene_buffer *scene_buffer,
|
||||
const struct wlr_color_luminances *lum);
|
||||
|
||||
/**
|
||||
* Calls the buffer's frame_done signal.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue