summaryrefslogtreecommitdiffstats
path: root/meta-agl-drm-lease/recipes-graphics/weston/weston/0001-compositor-do-not-request-repaint-in-output_enable.patch
blob: f982f0b641d978aee3c026934c554d2f8b3e5dab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From c030a31ee81e5d17002b4b6ee672ae3d532e4e28 Mon Sep 17 00:00:00 2001
From: Marius Vlad <marius.vlad@collabora.com>
Date: Sat, 4 May 2024 23:27:57 +0300
Subject: [PATCH] compositor: do not request repaint in output_enable

When enabling a weston_output, the compositor damages the entire output,
to ensure that the entire output is redrawn. However, this triggers a
repaint, which might happen before anything is actually drawn. The
result is a black frame before the shell is displayed.

Damage the entire output region, but do not trigger the repaint when
enabling a weston_output.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
---
 libweston/compositor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libweston/compositor.c b/libweston/compositor.c
index 34cde8c..3eba50d 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -7823,7 +7823,8 @@ weston_output_enable(struct weston_output *output)
 	}
 
 	weston_compositor_add_output(output->compositor, output);
-	weston_output_damage(output);
+	weston_output_flush_damage_for_plane(output, &output->primary_plane,
+					     &output->region);
 
 	head_names = weston_output_create_heads_string(output);
 	weston_log("Output '%s' enabled with head(s) %s\n",
-- 
2.43.0