summaryrefslogtreecommitdiffstats
path: root/meta-agl-drm-lease/recipes-graphics/weston/weston/0001-compositor-do-not-request-repaint-in-output_enable.patch
blob: 8301b051908c3da489f9ef9578cfd4eb06ac53a0 (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
37
38
From 434e7f0e87c7728ad2c9056ee4cf42686db2d5f2 Mon Sep 17 00:00:00 2001
From: Michael Tretter <m.tretter@pengutronix.de>
Date: Thu, 23 Aug 2018 16:58:47 +0200
Subject: [PATCH 3/3] 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>

%% original patch: 0001-compositor-do-not-request-repaint-in-output_enable.patch
---
 libweston/compositor.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libweston/compositor.c b/libweston/compositor.c
index 1670c50..a983e60 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -6762,7 +6762,9 @@ weston_output_enable(struct weston_output *output)
 	weston_output_init_zoom(output);
 
 	weston_output_init_geometry(output, x, y);
-	weston_output_damage(output);
+	pixman_region32_union(&c->primary_plane.damage,
+			      &c->primary_plane.damage,
+			      &output->region);
 
 	wl_list_init(&output->animation_list);
 	wl_list_init(&output->feedback_list);
-- 
2.17.1