weston: Update/port patches for Weston 13
[AGL/meta-agl-devel.git] / meta-agl-drm-lease / recipes-graphics / weston / weston / 0001-compositor-do-not-request-repaint-in-output_enable.patch
1 From c030a31ee81e5d17002b4b6ee672ae3d532e4e28 Mon Sep 17 00:00:00 2001
2 From: Marius Vlad <marius.vlad@collabora.com>
3 Date: Sat, 4 May 2024 23:27:57 +0300
4 Subject: [PATCH] compositor: do not request repaint in output_enable
5
6 When enabling a weston_output, the compositor damages the entire output,
7 to ensure that the entire output is redrawn. However, this triggers a
8 repaint, which might happen before anything is actually drawn. The
9 result is a black frame before the shell is displayed.
10
11 Damage the entire output region, but do not trigger the repaint when
12 enabling a weston_output.
13
14 Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
15 Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
16 ---
17  libweston/compositor.c | 3 ++-
18  1 file changed, 2 insertions(+), 1 deletion(-)
19
20 diff --git a/libweston/compositor.c b/libweston/compositor.c
21 index 34cde8c..3eba50d 100644
22 --- a/libweston/compositor.c
23 +++ b/libweston/compositor.c
24 @@ -7823,7 +7823,8 @@ weston_output_enable(struct weston_output *output)
25         }
26  
27         weston_compositor_add_output(output->compositor, output);
28 -       weston_output_damage(output);
29 +       weston_output_flush_damage_for_plane(output, &output->primary_plane,
30 +                                            &output->region);
31  
32         head_names = weston_output_create_heads_string(output);
33         weston_log("Output '%s' enabled with head(s) %s\n",
34 -- 
35 2.43.0
36