[PATCH weston] Remove cairo-gles2 support from toytoolkit
Bryce Harrington
bryce at osg.samsung.com
Wed Mar 16 02:04:41 UTC 2016
This is a first step towards stopping use of cairo-egl in demo apps.
See: https://bugs.freedesktop.org/show_bug.cgi?id=83878
The nested client had required cairo-gles2 but looks like it ought to
work with plain cairo-gl (at least, it compiles fine).
Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
---
Makefile.am | 2 --
clients/window.c | 19 +------------------
configure.ac | 29 ++++-------------------------
3 files changed, 5 insertions(+), 45 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index fe08d94..3ac4da2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -626,7 +626,6 @@ weston_scaler_SOURCES = clients/scaler.c
weston_scaler_LDADD = libtoytoolkit.la
weston_scaler_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
-if HAVE_CAIRO_GLESV2
demo_clients += weston-nested weston-nested-client
weston_nested_SOURCES = \
@@ -638,7 +637,6 @@ weston_nested_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
weston_nested_client_SOURCES = clients/nested-client.c
weston_nested_client_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
weston_nested_client_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
-endif
weston_eventdemo_SOURCES = \
clients/eventdemo.c \
diff --git a/clients/window.c b/clients/window.c
index ced867e..b7d831e 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -44,12 +44,7 @@
#ifdef HAVE_CAIRO_EGL
#include <wayland-egl.h>
-#ifdef USE_CAIRO_GLESV2
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-#else
#include <GL/gl.h>
-#endif
#include <EGL/egl.h>
#include <EGL/eglext.h>
@@ -5537,11 +5532,7 @@ init_egl(struct display *d)
EGLint major, minor;
EGLint n;
-#ifdef USE_CAIRO_GLESV2
-# define GL_BIT EGL_OPENGL_ES2_BIT
-#else
-# define GL_BIT EGL_OPENGL_BIT
-#endif
+#define GL_BIT EGL_OPENGL_ES2_BIT
static const EGLint argb_cfg_attribs[] = {
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
@@ -5554,16 +5545,8 @@ init_egl(struct display *d)
EGL_NONE
};
-#ifdef USE_CAIRO_GLESV2
- static const EGLint context_attribs[] = {
- EGL_CONTEXT_CLIENT_VERSION, 2,
- EGL_NONE
- };
- EGLint api = EGL_OPENGL_ES_API;
-#else
EGLint *context_attribs = NULL;
EGLint api = EGL_OPENGL_API;
-#endif
d->dpy =
weston_platform_get_egl_display(EGL_PLATFORM_WAYLAND_KHR,
diff --git a/configure.ac b/configure.ac
index 9e8115a..87b9856 100644
--- a/configure.ac
+++ b/configure.ac
@@ -258,7 +258,7 @@ if test x$enable_screen_sharing = xyes; then
fi
AC_ARG_WITH(cairo,
- AS_HELP_STRING([--with-cairo=@<:@image|gl|glesv2@:>@]
+ AS_HELP_STRING([--with-cairo=@<:@image|gl@:>@]
[Which Cairo renderer to use for the clients]),
[],[with_cairo="image"])
@@ -269,27 +269,9 @@ if test "x$with_cairo" = "xgl"; then
cairo_modules="cairo-gl"
AC_MSG_WARN([The --with-cairo=gl option can cause increased resource usage and potential instability, and thus is not recommended. It is needed only for a few special demo programs.])
else
-if test "x$with_cairo" = "xglesv2"; then
- cairo_modules="cairo-glesv2"
- AC_MSG_WARN([The --with-cairo=gles2 option can cause increased resource usage and potential instability, and thus is not recommended. It is needed only for a few special demo programs.])
-else
AC_ERROR([Unknown cairo renderer requested])
fi
fi
-fi
-
-# Included for legacy compat
-AC_ARG_WITH(cairo-glesv2,
- AS_HELP_STRING([--with-cairo-glesv2],
- [Use GLESv2 cairo]))
-if test "x$with_cairo_glesv2" = "xyes"; then
- cairo_modules="cairo-glesv2"
- with_cairo="glesv2"
-fi
-
-if test "x$cairo_modules" = "xcairo-glesv2"; then
-AC_DEFINE([USE_CAIRO_GLESV2], [1], [Use the GLESv2 GL cairo backend])
-fi
PKG_CHECK_MODULES(PIXMAN, [pixman-1])
PKG_CHECK_MODULES(PNG, [libpng])
@@ -391,8 +373,8 @@ if test x$enable_clients = xyes; then
PKG_CHECK_MODULES(SERVER, [wayland-server])
PKG_CHECK_MODULES(WESTON_INFO, [wayland-client >= 1.5.91])
- # Only check for cairo-egl if a GL or GLES renderer requested
- AS_IF([test "x$cairo_modules" = "xcairo-gl" -o "x$cairo_modules" = "xcairo-glesv2"], [
+ # Only check for cairo-egl if a GL renderer requested
+ AS_IF([test "x$cairo_modules" = "xcairo-gl"], [
PKG_CHECK_MODULES(CAIRO_EGL, [wayland-egl egl cairo-egl >= 1.11.3 $cairo_modules],
[have_cairo_egl=yes], [have_cairo_egl=no])
AS_IF([test "x$have_cairo_egl" = "xyes"],
@@ -423,14 +405,11 @@ fi
AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
-AM_CONDITIONAL(HAVE_CAIRO_GLESV2,
- [test "x$have_cairo_egl" = "xyes" -a "x$cairo_modules" = "xcairo-glesv2" -a "x$enable_egl" = "xyes"])
-
AM_CONDITIONAL(BUILD_FULL_GL_CLIENTS,
test x$cairo_modules = "xcairo-gl" -a "x$have_cairo_egl" = "xyes" -a "x$enable_egl" = "xyes")
AM_CONDITIONAL(BUILD_SUBSURFACES_CLIENT,
- [test '(' "x$have_cairo_egl" != "xyes" -o "x$cairo_modules" = "xcairo-glesv2" ')' -a "x$enable_simple_egl_clients" = "xyes"])
+ [test "x$have_cairo_egl" != "xyes" -a "x$enable_simple_egl_clients" = "xyes"])
AM_CONDITIONAL(ENABLE_DESKTOP_SHELL, true)
--
1.9.1
More information about the wayland-devel
mailing list