diff options
Diffstat (limited to 'recipes-graphics/wayland/weston/0001-Add-support-for-Vivante-FBDEV-EGL.patch')
-rw-r--r-- | recipes-graphics/wayland/weston/0001-Add-support-for-Vivante-FBDEV-EGL.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/recipes-graphics/wayland/weston/0001-Add-support-for-Vivante-FBDEV-EGL.patch b/recipes-graphics/wayland/weston/0001-Add-support-for-Vivante-FBDEV-EGL.patch new file mode 100644 index 0000000..6c8dfe9 --- /dev/null +++ b/recipes-graphics/wayland/weston/0001-Add-support-for-Vivante-FBDEV-EGL.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | From bc8f870072b134ffc9b8047a53835b7b6f714d5d Mon Sep 17 00:00:00 2001 | ||
2 | From: Prabhu Sundararaj <prabhu.sundararaj@freescale.com> | ||
3 | Date: Tue, 11 Mar 2014 17:35:52 -0500 | ||
4 | Subject: [PATCH] Add support for Vivante FBDEV EGL | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@freescale.com> | ||
9 | --- | ||
10 | src/compositor-fbdev.c | 20 +++++++++++++++++--- | ||
11 | 1 file changed, 17 insertions(+), 3 deletions(-) | ||
12 | |||
13 | diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c | ||
14 | index 0d96269..ada0019 100644 | ||
15 | --- a/src/compositor-fbdev.c | ||
16 | +++ b/src/compositor-fbdev.c | ||
17 | @@ -53,6 +53,7 @@ struct fbdev_compositor { | ||
18 | struct udev_input input; | ||
19 | int use_pixman; | ||
20 | struct wl_listener session_listener; | ||
21 | + EGLNativeDisplayType display; | ||
22 | }; | ||
23 | |||
24 | struct fbdev_screeninfo { | ||
25 | @@ -87,6 +88,9 @@ struct fbdev_output { | ||
26 | pixman_image_t *shadow_surface; | ||
27 | void *shadow_buf; | ||
28 | uint8_t depth; | ||
29 | + | ||
30 | + EGLNativeDisplayType display; | ||
31 | + EGLNativeWindowType window; | ||
32 | }; | ||
33 | |||
34 | struct fbdev_parameters { | ||
35 | @@ -626,9 +630,13 @@ fbdev_output_create(struct fbdev_compositor *compositor, | ||
36 | if (pixman_renderer_output_create(&output->base) < 0) | ||
37 | goto out_shadow_surface; | ||
38 | } else { | ||
39 | - setenv("HYBRIS_EGLPLATFORM", "wayland", 1); | ||
40 | + output->window = fbCreateWindow(compositor->display, -1, -1, 0, 0); | ||
41 | + if (output->window == NULL) { | ||
42 | + fprintf(stderr, "failed to create window\n"); | ||
43 | + return 0; | ||
44 | + } | ||
45 | if (gl_renderer->output_create(&output->base, | ||
46 | - (EGLNativeWindowType)NULL) < 0) { | ||
47 | + (EGLNativeWindowType)output->window) < 0) { | ||
48 | weston_log("gl_renderer_output_create failed.\n"); | ||
49 | goto out_shadow_surface; | ||
50 | } | ||
51 | @@ -920,8 +928,14 @@ fbdev_compositor_create(struct wl_display *display, int *argc, char *argv[], | ||
52 | weston_log("could not load gl renderer\n"); | ||
53 | goto out_launcher; | ||
54 | } | ||
55 | + | ||
56 | + compositor->display = fbGetDisplay(compositor->base.wl_display); | ||
57 | + if (compositor->display == NULL) { | ||
58 | + weston_log("fbGetDisplay failed.\n"); | ||
59 | + goto out_launcher; | ||
60 | + } | ||
61 | |||
62 | - if (gl_renderer->create(&compositor->base, EGL_DEFAULT_DISPLAY, | ||
63 | + if (gl_renderer->create(&compositor->base, compositor->display, | ||
64 | gl_renderer->opaque_attribs, | ||
65 | NULL) < 0) { | ||
66 | weston_log("gl_renderer_create failed.\n"); | ||
67 | -- | ||
68 | 1.8.1.2 | ||
69 | |||