blob: a4bf921d863b5103adb1b50036574f20fb67a837 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001From 46cee2c18276062d45817fd38fedfa737f16f776 Mon Sep 17 00:00:00 2001
2From: Jia Rong <jia.rong@mediatek.com>
3Date: Fri, 20 Apr 2018 11:23:00 +0800
4Subject: [PATCH 3/9] compose-engine: turn to pixman if gl init fail
5
6if init_gl fail then turn to pixman to compose buffer
7Test: test ok
8
9Change-Id: I18979e4d6cc2d12e51bc12e7be581e919b3166e8
10Signed-off-by: Jia Rong <jia.rong@mediatek.com>
11CR-Id: AUTO00016576
12---
13 libweston/compositor-drm.c | 9 +++++++--
14 1 file changed, 7 insertions(+), 2 deletions(-)
15
16diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
17index 1d38f05..4a5cd67 100644
18--- a/libweston/compositor-drm.c
19+++ b/libweston/compositor-drm.c
20@@ -1642,6 +1642,7 @@ init_egl(struct drm_backend *b)
21
22 if (drm_backend_create_gl_renderer(b) < 0) {
23 gbm_device_destroy(b->gbm);
24+ b->gbm = NULL;
25 return -1;
26 }
27
28@@ -3261,8 +3262,12 @@ drm_backend_create(struct weston_compositor *compositor,
29 }
30 } else {
31 if (init_egl(b) < 0) {
32- weston_log("failed to initialize egl\n");
33- goto err_udev_dev;
34+ weston_log("failed to initialize egl, use pixman\n");
35+ if (init_pixman(b) < 0) {
36+ weston_log("failed to initialize pixman renderer\n");
37+ goto err_udev_dev;
38+ }
39+ b->use_pixman = 1;
40 }
41 }
42
43--
441.9.1
45