summaryrefslogtreecommitdiffstats
path: root/recipes-graphics
diff options
context:
space:
mode:
authorLauren Post <lauren.post@freescale.com>2015-07-24 10:40:49 -0500
committerOtavio Salvador <otavio@ossystems.com.br>2015-08-27 15:33:31 -0300
commit3daa4de96c7a9c163d139fe68e665023f1243ecf (patch)
tree01aad282833c5dcd2c2d4b5419dfb9fb3e06f075 /recipes-graphics
parent6f47a134c5f729f8b6a5821cb37f0d58c61e2d38 (diff)
downloadmeta-fsl-arm-3daa4de96c7a9c163d139fe68e665023f1243ecf.tar.gz
mesa-demos: Add Wayland and OpenVG support
Add patches to support both OpenVG and Wayland support. Add configuration to enable in PACKAGECONFIG. Signed-off-by: Lauren Post <lauren.post@freescale.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-graphics')
-rw-r--r--recipes-graphics/mesa/mesa-demos/Add-OpenVG-demos-to-support-wayland.patch99
-rw-r--r--recipes-graphics/mesa/mesa-demos/Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch28
-rw-r--r--recipes-graphics/mesa/mesa-demos_%.bbappend9
3 files changed, 135 insertions, 1 deletions
diff --git a/recipes-graphics/mesa/mesa-demos/Add-OpenVG-demos-to-support-wayland.patch b/recipes-graphics/mesa/mesa-demos/Add-OpenVG-demos-to-support-wayland.patch
new file mode 100644
index 0000000..726d67b
--- /dev/null
+++ b/recipes-graphics/mesa/mesa-demos/Add-OpenVG-demos-to-support-wayland.patch
@@ -0,0 +1,99 @@
1From 8aba54422d9a77383c150f9f70240b18b6e1918e Mon Sep 17 00:00:00 2001
2From: Prabhu Sundararaj <prabhu.sundararaj@freescale.com>
3Date: Thu, 9 Apr 2015 15:47:21 -0500
4Subject: [PATCH] Add OpenVG demos to support wayland.
5
6Upstream Status: Pending
7
8Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@freescale.com>
9---
10 src/egl/Makefile.am | 6 +++---
11 src/egl/openvg/Makefile.am | 33 +++++++++++++++++++++++++++++----
12 2 files changed, 32 insertions(+), 7 deletions(-)
13
14diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
15index 4fe1ca8..65f4570 100644
16--- a/src/egl/Makefile.am
17+++ b/src/egl/Makefile.am
18@@ -26,10 +26,10 @@ SUBDIRS = \
19 eglut \
20 opengles1 \
21 opengles2 \
22- oes_vg
23+ oes_vg \
24+ openvg
25
26 if HAVE_GLU
27 SUBDIRS += \
28- opengl \
29- openvg
30+ opengl
31 endif
32diff --git a/src/egl/openvg/Makefile.am b/src/egl/openvg/Makefile.am
33index b545225..a2e0d94 100644
34--- a/src/egl/openvg/Makefile.am
35+++ b/src/egl/openvg/Makefile.am
36@@ -46,31 +46,56 @@ EGL_X11_DEMOS += \
37 text
38 endif
39 endif
40+if HAVE_WAYLAND
41+EGL_WL_DEMOS = \
42+ lion_wayland \
43+ sp_wayland
44
45+if HAVE_FREETYPE2
46+EGL_WL_DEMOS += \
47+ vgtext_wayland
48+endif
49+endif
50 if HAVE_EGL
51 if HAVE_VG
52 bin_PROGRAMS = \
53 lion_screen \
54 sp_screen \
55- $(EGL_X11_DEMOS)
56+ $(EGL_X11_DEMOS) \
57+ $(EGL_WL_DEMOS)
58 endif
59 endif
60
61 lion_screen_SOURCES = lion.c lion-render.c lion-render.h
62+lion_screen_LDADD = ../eglut/libeglut_screen.la
63+
64 sp_screen_SOURCES = sp.c
65+sp_screen_LDADD = ../eglut/libeglut_screen.la
66
67+if HAVE_X11
68 lion_x11_SOURCES = lion.c lion-render.c lion-render.h
69 sp_x11_SOURCES = sp.c
70
71-lion_screen_LDADD = ../eglut/libeglut_screen.la
72-sp_screen_LDADD = ../eglut/libeglut_screen.la
73-
74 lion_x11_LDADD = ../eglut/libeglut_x11.la
75 sp_x11_LDADD = ../eglut/libeglut_x11.la
76
77 text_SOURCES = text.c
78 text_CFLAGS = $(AM_CFLAGS) @FREETYPE2_CFLAGS@
79 text_LDADD = @FREETYPE2_LIBS@ ../eglut/libeglut_x11.la
80+endif
81+
82+if HAVE_WAYLAND
83+lion_wayland_SOURCES = lion.c lion-render.c lion-render.h
84+lion_wayland_LDADD = ../eglut/libeglut_wayland.la
85+
86+sp_wayland_SOURCES = sp.c
87+sp_wayland_LDADD = ../eglut/libeglut_wayland.la
88+
89+vgtext_wayland_SOURCES = text.c
90+vgtext_wayland_CFLAGS = $(AM_CFLAGS) @FREETYPE2_CFLAGS@
91+vgtext_wayland_LDADD = @FREETYPE2_LIBS@ ../eglut/libeglut_wayland.la
92+
93+endif
94
95 SUBDIRS = \
96 trivial
97--
982.3.5
99
diff --git a/recipes-graphics/mesa/mesa-demos/Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch b/recipes-graphics/mesa/mesa-demos/Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch
new file mode 100644
index 0000000..180a9d8
--- /dev/null
+++ b/recipes-graphics/mesa/mesa-demos/Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch
@@ -0,0 +1,28 @@
1From 010af1952d935352764389636b7165283e6c9e3f Mon Sep 17 00:00:00 2001
2From: Prabhu Sundararaj <prabhu.sundararaj@freescale.com>
3Date: Tue, 7 Apr 2015 17:58:45 -0500
4Subject: [PATCH] Additional eglSwapBuffer calling makes wrong throttling
5
6Upstream Status: Pending
7
8Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@freescale.com>
9---
10 src/egl/eglut/eglut_wayland.c | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/src/egl/eglut/eglut_wayland.c b/src/egl/eglut/eglut_wayland.c
14index 968b33f..5664d35 100644
15--- a/src/egl/eglut/eglut_wayland.c
16+++ b/src/egl/eglut/eglut_wayland.c
17@@ -155,7 +155,7 @@ draw(void *data, struct wl_callback *callback, uint32_t time)
18
19 if (win->display_cb)
20 win->display_cb();
21- eglSwapBuffers(_eglut->dpy, win->surface);
22+ /*eglSwapBuffers(_eglut->dpy, win->surface);*/
23
24 if (callback)
25 wl_callback_destroy(callback);
26--
272.3.5
28
diff --git a/recipes-graphics/mesa/mesa-demos_%.bbappend b/recipes-graphics/mesa/mesa-demos_%.bbappend
index c8d1667..cc245b2 100644
--- a/recipes-graphics/mesa/mesa-demos_%.bbappend
+++ b/recipes-graphics/mesa/mesa-demos_%.bbappend
@@ -1,7 +1,9 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" 1FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2 2
3MESA-DEMO-PATCH = " file://Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch \ 3MESA-DEMO-PATCH = " file://Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch \
4 file://fix-clear-build-break.patch" 4 file://fix-clear-build-break.patch \
5 file://Additional-eglSwapBuffer-calling-makes-wrong-throttl.patch \
6 file://Add-OpenVG-demos-to-support-wayland.patch"
5 7
6# only apply patches on mx6 that have a GPU 8# only apply patches on mx6 that have a GPU
7SRC_URI_append_mx6q = " ${MESA-DEMO-PATCH}" 9SRC_URI_append_mx6q = " ${MESA-DEMO-PATCH}"
@@ -17,3 +19,8 @@ PACKAGECONFIG_remove_mx6q = "${REMOVE_GLU}"
17PACKAGECONFIG_remove_mx6dl = "${REMOVE_GLU}" 19PACKAGECONFIG_remove_mx6dl = "${REMOVE_GLU}"
18PACKAGECONFIG_remove_mx6sx = "${REMOVE_GLU}" 20PACKAGECONFIG_remove_mx6sx = "${REMOVE_GLU}"
19PACKAGECONFIG_remove_mx6sl = "gles1 gles2 ${REMOVE_GLU}" 21PACKAGECONFIG_remove_mx6sl = "gles1 gles2 ${REMOVE_GLU}"
22
23PACKAGECONFIG_append = "\
24 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \
25 bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland vg', '', d), d)} \
26"