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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
From 0d24f9872fc5bbbb07ae55f1107ba0f5060fca8a Mon Sep 17 00:00:00 2001
From: Yong Gan <b45748@freescale.com>
Date: Thu, 22 May 2014 15:25:42 +0800
Subject: [PATCH 1/3] ENGR00314805-1 Add Vivante EGL support
Add Vivante EGL compositor support.
Upstream-Status: Pending
[DATE]05-22-2014
Signed-off-by Yong Gan <B45748@freescale.com>
---
src/compositor-fbdev.c | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
index e703e0e..3db1d17 100644
--- a/src/compositor-fbdev.c
+++ b/src/compositor-fbdev.c
@@ -53,6 +53,7 @@ struct fbdev_compositor {
struct udev_input input;
int use_pixman;
struct wl_listener session_listener;
+ EGLNativeDisplayType display;
};
struct fbdev_screeninfo {
@@ -87,6 +88,9 @@ struct fbdev_output {
pixman_image_t *shadow_surface;
void *shadow_buf;
uint8_t depth;
+
+ EGLNativeDisplayType display;
+ EGLNativeWindowType window;
};
struct fbdev_parameters {
@@ -627,10 +631,15 @@ fbdev_output_create(struct fbdev_compositor *compositor,
goto out_shadow_surface;
} else {
setenv("HYBRIS_EGLPLATFORM", "wayland", 1);
+ output->window = fbCreateWindow(compositor->display, -1, -1, 0, 0);
+ if (output->window == NULL) {
+ fprintf(stderr, "failed to create window\n");
+ return 0;
+ }
if (gl_renderer->output_create(&output->base,
- (EGLNativeWindowType)NULL,
- gl_renderer->opaque_attribs,
- NULL) < 0) {
+ (EGLNativeWindowType)output->window,
+ gl_renderer->opaque_attribs,
+ NULL) < 0) {
weston_log("gl_renderer_output_create failed.\n");
goto out_shadow_surface;
}
@@ -923,7 +932,13 @@ fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[],
goto out_launcher;
}
- if (gl_renderer->create(&compositor->base, EGL_DEFAULT_DISPLAY,
+ compositor->display = fbGetDisplay(compositor->base.wl_display);
+ if (compositor->display == NULL) {
+ weston_log("fbGetDisplay failed.\n");
+ goto out_launcher;
+ }
+
+ if (gl_renderer->create(&compositor->base, compositor->display,
gl_renderer->opaque_attribs,
NULL) < 0) {
weston_log("gl_renderer_create failed.\n");
--
1.7.9.5
|