mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-07 04:06:14 -05:00
output: add color transform to state
Color transforms are better suited than raw gamma tables, because: - They don't need to get copied around: they are ref'counted. - They can represent more color operations (will be useful for the upcoming KMS color pipeline API, and for the Wayland color management protocol).
This commit is contained in:
parent
74217a4d93
commit
97f6946c8d
3 changed files with 33 additions and 1 deletions
|
|
@ -74,6 +74,7 @@ enum wlr_output_state_field {
|
|||
WLR_OUTPUT_STATE_LAYERS = 1 << 10,
|
||||
WLR_OUTPUT_STATE_WAIT_TIMELINE = 1 << 11,
|
||||
WLR_OUTPUT_STATE_SIGNAL_TIMELINE = 1 << 12,
|
||||
WLR_OUTPUT_STATE_COLOR_TRANSFORM = 1 << 13,
|
||||
};
|
||||
|
||||
enum wlr_output_state_mode_type {
|
||||
|
|
@ -132,6 +133,8 @@ struct wlr_output_state {
|
|||
uint64_t wait_point;
|
||||
struct wlr_drm_syncobj_timeline *signal_timeline;
|
||||
uint64_t signal_point;
|
||||
|
||||
struct wlr_color_transform *color_transform;
|
||||
};
|
||||
|
||||
struct wlr_output_impl;
|
||||
|
|
@ -586,6 +589,13 @@ void wlr_output_state_set_wait_timeline(struct wlr_output_state *state,
|
|||
*/
|
||||
void wlr_output_state_set_signal_timeline(struct wlr_output_state *state,
|
||||
struct wlr_drm_syncobj_timeline *timeline, uint64_t dst_point);
|
||||
/**
|
||||
* Set the color transform for an output.
|
||||
*
|
||||
* The color transform is applied after blending output layers.
|
||||
*/
|
||||
void wlr_output_state_set_color_transform(struct wlr_output_state *state,
|
||||
struct wlr_color_transform *tr);
|
||||
|
||||
/**
|
||||
* Copies the output state from src to dst. It is safe to then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue