diff options
author | Simon Ser <contact@emersion.fr> | 2024-06-08 11:28:42 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2024-06-08 11:28:42 +0200 |
commit | 63be5eb3bed9b0899418f526e3754bbdbd0c9f1c (patch) | |
tree | 05747830dc3fdcb1de5744ab6b7fd6190eb7ad2a | |
parent | sway/commands/output: Add command to set color profile (diff) | |
download | sway-63be5eb3bed9b0899418f526e3754bbdbd0c9f1c.tar.gz sway-63be5eb3bed9b0899418f526e3754bbdbd0c9f1c.tar.zst sway-63be5eb3bed9b0899418f526e3754bbdbd0c9f1c.zip |
Set color transform when calling wlr_scene_output_build_state()missing-color-transform
We were only passing the color transform when calling
wlr_scene_output_commit(). However when modesetting or pushing a
new gamma LUT we render via wlr_scene_output_build_state(). Pass
the color transform there as well.
-rw-r--r-- | sway/config/output.c | 1 | ||||
-rw-r--r-- | sway/desktop/output.c | 9 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index bcd21b9b..16be49c8 100644 --- a/sway/config/output.c +++ b/sway/config/output.c | |||
@@ -927,6 +927,7 @@ bool apply_output_configs(struct matched_output_config *configs, | |||
927 | struct wlr_scene_output_state_options opts = { | 927 | struct wlr_scene_output_state_options opts = { |
928 | .swapchain = wlr_output_swapchain_manager_get_swapchain( | 928 | .swapchain = wlr_output_swapchain_manager_get_swapchain( |
929 | &swapchain_mgr, backend_state->output), | 929 | &swapchain_mgr, backend_state->output), |
930 | .color_transform = cfg->output->color_transform, | ||
930 | }; | 931 | }; |
931 | struct wlr_scene_output *scene_output = cfg->output->scene_output; | 932 | struct wlr_scene_output *scene_output = cfg->output->scene_output; |
932 | struct wlr_output_state *state = &backend_state->base; | 933 | struct wlr_output_state *state = &backend_state->base; |
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index cfa53021..6bf77d17 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -243,10 +243,14 @@ static int output_repaint_timer_handler(void *data) { | |||
243 | 243 | ||
244 | output_configure_scene(output, &root->root_scene->tree.node, 1.0f); | 244 | output_configure_scene(output, &root->root_scene->tree.node, 1.0f); |
245 | 245 | ||
246 | struct wlr_scene_output_state_options opts = { | ||
247 | .color_transform = output->color_transform, | ||
248 | }; | ||
249 | |||
246 | if (output->gamma_lut_changed) { | 250 | if (output->gamma_lut_changed) { |
247 | struct wlr_output_state pending; | 251 | struct wlr_output_state pending; |
248 | wlr_output_state_init(&pending); | 252 | wlr_output_state_init(&pending); |
249 | if (!wlr_scene_output_build_state(output->scene_output, &pending, NULL)) { | 253 | if (!wlr_scene_output_build_state(output->scene_output, &pending, &opts)) { |
250 | return 0; | 254 | return 0; |
251 | } | 255 | } |
252 | 256 | ||
@@ -269,9 +273,6 @@ static int output_repaint_timer_handler(void *data) { | |||
269 | return 0; | 273 | return 0; |
270 | } | 274 | } |
271 | 275 | ||
272 | struct wlr_scene_output_state_options opts = { | ||
273 | .color_transform = output->color_transform, | ||
274 | }; | ||
275 | wlr_scene_output_commit(output->scene_output, &opts); | 276 | wlr_scene_output_commit(output->scene_output, &opts); |
276 | return 0; | 277 | return 0; |
277 | } | 278 | } |