[cogl/rstrode/wip/prepare-for-mutter-merge: 3/12] renderer: drop support for SDL



commit 75751d91b14389ce34e78a30ed973e34bc8a983a
Author: Ray Strode <rstrode redhat com>
Date:   Tue Jan 12 16:35:51 2016 -0500

    renderer: drop support for SDL

 build/win32/vs10/cogl-sdl2-hello.vcxproj         |  173 ------
 build/win32/vs10/cogl-sdl2-hello.vcxproj.filters |   14 -
 build/win32/vs9/cogl-sdl2-hello.vcproj           |  161 ------
 cogl/Makefile.am                                 |   16 -
 cogl/cogl-defines.h.win32_SDL.in                 |   78 ---
 cogl/cogl-renderer-private.h                     |    5 -
 cogl/cogl-renderer.c                             |    6 -
 cogl/cogl-renderer.h                             |    2 -
 cogl/cogl-sdl.c                                  |  111 ----
 cogl/cogl-sdl.h                                  |  248 ---------
 cogl/winsys/cogl-winsys-sdl-private.h            |   37 --
 cogl/winsys/cogl-winsys-sdl.c                    |  490 -----------------
 cogl/winsys/cogl-winsys-sdl2.c                   |  638 ----------------------
 configure.ac                                     |   94 ----
 examples/Makefile.am                             |   18 -
 examples/cogl-sdl-hello.c                        |  156 ------
 examples/cogl-sdl2-hello.c                       |  169 ------
 17 files changed, 0 insertions(+), 2416 deletions(-)
---
diff --git a/cogl/Makefile.am b/cogl/Makefile.am
index ebd062e..53407f0 100644
--- a/cogl/Makefile.am
+++ b/cogl/Makefile.am
@@ -503,20 +503,6 @@ cogl_sources_c += \
        winsys/cogl-winsys-egl-feature-functions.h \
        winsys/cogl-winsys-egl-private.h
 endif
-if SUPPORT_SDL
-cogl_experimental_h += $(srcdir)/cogl-sdl.h
-cogl_sources_c += \
-       winsys/cogl-winsys-sdl-private.h \
-       winsys/cogl-winsys-sdl.c \
-       cogl-sdl.c
-endif
-if SUPPORT_SDL2
-cogl_experimental_h += $(srcdir)/cogl-sdl.h
-cogl_sources_c += \
-       winsys/cogl-winsys-sdl-private.h \
-       winsys/cogl-winsys-sdl2.c \
-       cogl-sdl.c
-endif
 
 EXTRA_DIST += stb_image.c
 
@@ -643,8 +629,6 @@ cogl.vsenums_c:
 EXTRA_DIST += \
        cogl-defines.h.win32.in \
        cogl-defines.h.win32    \
-       cogl-defines.h.win32_SDL.in     \
-       cogl-defines.h.win32_SDL        \
        cogl-gl-header.h.win32  \
        cogl.symbols    \
        cogl.rc.in      \
diff --git a/cogl/cogl-renderer-private.h b/cogl/cogl-renderer-private.h
index 0f309e6..7ca7030 100644
--- a/cogl/cogl-renderer-private.h
+++ b/cogl/cogl-renderer-private.h
@@ -100,11 +100,6 @@ struct _CoglRenderer
   int kms_fd;
 #endif
 
-#ifdef COGL_HAS_SDL_SUPPORT
-  CoglBool sdl_event_type_set;
-  uint32_t sdl_event_type;
-#endif
-
   /* List of callback functions that will be given every native event */
   GSList *event_filters;
   void *winsys;
diff --git a/cogl/cogl-renderer.c b/cogl/cogl-renderer.c
index bae3a01..30038df 100644
--- a/cogl/cogl-renderer.c
+++ b/cogl/cogl-renderer.c
@@ -72,9 +72,6 @@
 #ifdef COGL_HAS_WGL_SUPPORT
 #include "cogl-winsys-wgl-private.h"
 #endif
-#ifdef COGL_HAS_SDL_SUPPORT
-#include "cogl-winsys-sdl-private.h"
-#endif
 
 #ifdef COGL_HAS_XLIB_SUPPORT
 #include "cogl-xlib-renderer.h"
@@ -213,9 +210,6 @@ static CoglWinsysVtableGetter _cogl_winsys_vtable_getters[] =
 #ifdef COGL_HAS_WGL_SUPPORT
   _cogl_winsys_wgl_get_vtable,
 #endif
-#ifdef COGL_HAS_SDL_SUPPORT
-  _cogl_winsys_sdl_get_vtable,
-#endif
   _cogl_winsys_stub_get_vtable,
 };
 
diff --git a/cogl/cogl-renderer.h b/cogl/cogl-renderer.h
index e9d18b8..73182c1 100644
--- a/cogl/cogl-renderer.h
+++ b/cogl/cogl-renderer.h
@@ -169,7 +169,6 @@ cogl_renderer_new (void);
  * @COGL_WINSYS_ID_EGL_ANDROID: Use EGL with the Android platform
  * @COGL_WINSYS_ID_EGL_MIR: Use EGL with the Mir server
  * @COGL_WINSYS_ID_WGL: Use the Microsoft Windows WGL binding API
- * @COGL_WINSYS_ID_SDL: Use the SDL window system
  *
  * Identifies specific window system backends that Cogl supports.
  *
@@ -188,7 +187,6 @@ typedef enum
   COGL_WINSYS_ID_EGL_ANDROID,
   COGL_WINSYS_ID_EGL_MIR,
   COGL_WINSYS_ID_WGL,
-  COGL_WINSYS_ID_SDL
 } CoglWinsysID;
 
 /**
diff --git a/configure.ac b/configure.ac
index 3e88e38..6effdf8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -919,93 +919,6 @@ AS_IF([test "x$enable_wgl" = "xyes"],
       ])
 AM_CONDITIONAL(SUPPORT_WGL, [test "x$SUPPORT_WGL" = "xyes"])
 
-AC_ARG_ENABLE(
-  [sdl],
-  [AC_HELP_STRING([--enable-sdl=@<:@no/yes@:>@], [Enable support SDL @<:@default=no@:>@])],
-  [],
-  [enable_sdl=no])
-AS_IF([test "x$enable_sdl" = "xyes"],
-      [
-        AS_IF([test "x$enable_emscripten" = "xno"],
-              [
-                PKG_CHECK_MODULES([SDL],
-                                  [sdl],
-                                  [
-                                   COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES sdl"
-                                  ],
-                                  [
-                                   AC_CHECK_HEADER([SDL/SDL.h],
-                                                   [],
-                                                   [AC_MSG_ERROR([SDL support requested but SDL not found])])
-                                  ])
-              ])
-
-        SUPPORT_SDL=yes
-        GL_WINSYS_APIS="$GL_WINSYS_APIS sdl"
-
-        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_SDL_SUPPORT"
-
-        dnl If we are building with emscripten then that simply implies we are
-        dnl using SDL in conjunction with WebGL (GLES2)
-        AS_IF([test "x$enable_emscripten" = "xyes"],
-              [
-                SUPPORTED_SDL_GL_APIS="webgl"
-                SUPPORT_SDL_WEBGL=yes
-                SUPPORT_SDL_GLES=no
-                COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_SDL_WEBGL_SUPPORT"
-              ],
-              [
-                dnl WebOS has a specially patched version of SDL to add
-                dnl support for creating a GLES1/2 context. This tries to
-                dnl detect that patch so we can use it if the GLES2 driver is
-                dnl selected.
-                cogl_save_CPPFLAGS="$CPPFLAGS"
-                CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
-                AC_CHECK_DECL([SDL_OPENGLES],
-                              [SUPPORT_SDL_GLES=yes],
-                              [SUPPORT_SDL_GLES=no],
-                              [#include <SDL.h>])
-                AC_CHECK_DECL([SDL_GL_CONTEXT_MAJOR_VERSION], [], [SUPPORT_SDL_GLES=no],
-                              [#include <SDL.h>])
-                AC_CHECK_DECL([SDL_GL_CONTEXT_MINOR_VERSION], [], [SUPPORT_SDL_GLES=no],
-                              [#include <SDL.h>])
-                CPPFLAGS="$cogl_save_CPPFLAGS"
-
-                AS_IF([test "x$SUPPORT_SDL_GLES" = "xyes"],
-                      [
-                       SUPPORTED_SDL_GL_APIS="gles1 gles2"
-                       COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_SDL_GLES_SUPPORT"
-                      ],
-                      [ SUPPORTED_SDL_GL_APIS="gl" ])
-              ])
-      ],
-      [SUPPORT_SDL=no])
-AM_CONDITIONAL(SUPPORT_SDL, [test "x$SUPPORT_SDL" = "xyes"])
-
-AC_ARG_ENABLE(
-  [sdl2],
-  [AC_HELP_STRING([--enable-sdl2=@<:@no/yes@:>@], [Enable SDL2 support @<:@default=no@:>@])],
-  [],
-  [enable_sdl2=no])
-AS_IF([test "x$enable_sdl2" = "xyes"],
-      [
-        PKG_CHECK_MODULES([SDL2],
-                          [sdl2],
-                          [],
-                          [AC_MSG_ERROR([SDL2 support requested but SDL2 not found])])
-
-        SUPPORT_SDL2=yes
-        GL_WINSYS_APIS="$GL_WINSYS_APIS sdl2"
-        COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES sdl2"
-
-        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_SDL_SUPPORT"
-      ],
-      [SUPPORT_SDL2=no])
-AM_CONDITIONAL(SUPPORT_SDL2, [test "x$SUPPORT_SDL2" = "xyes"])
-
-AS_IF([test "x$SUPPORT_SDL2" = "xyes" -a "x$SUPPORT_SDL" = "xyes"],
-      [AC_MSG_ERROR([The SDL1 and SDL2 winsyses are currently mutually exclusive])])
-
 EGL_PLATFORM_COUNT=0
 
 AC_ARG_ENABLE(
@@ -1136,9 +1049,6 @@ AC_ARG_ENABLE(
   [],
   AS_IF([test "x$enable_gles1" = "xyes" -o \
          "x$enable_gles2" = "xyes" && \
-         test "x$SUPPORT_SDL_GLES" != "xyes" && \
-         test "x$SUPPORT_SDL_WEBGL" != "xyes" && \
-         test "x$SUPPORT_SDL2" != "xyes" && \
          test $EGL_PLATFORM_COUNT -eq 0],
         [enable_xlib_egl_platform=yes], [enable_xlib_egl_platform=no])
 )
@@ -1441,7 +1351,6 @@ cogl/cogl-1.0.pc
 cogl/cogl-2.0-experimental.pc
 cogl/cogl-defines.h
 cogl/cogl-defines.h.win32
-cogl/cogl-defines.h.win32_SDL
 cogl/cogl-gl-header.h
 cogl/cogl-egl-defines.h
 cogl/cogl.rc
@@ -1505,9 +1414,6 @@ if test "x$SUPPORT_EGL" = "xyes"; then
 echo "        EGL Platforms:${EGL_PLATFORMS}"
 echo "        Wayland compositor support: ${enable_wayland_egl_server}"
 fi
-if test "x$SUPPORT_SDL" = "xyes"; then
-echo "        Supported SDL GL APIs: ${SUPPORTED_SDL_GL_APIS}"
-fi
 echo "        Building for emscripten environment: $enable_emscripten"
 echo "        Build libcogl-gles2 GLES 2.0 frontend api: ${enable_cogl_gles2}"
 echo "        Image backend: ${COGL_IMAGE_BACKEND}"
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 01cf003..405913f 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -88,32 +88,14 @@ endif
 
 endif #USE_GLIB
 
-# XXX although emscripten "supports sdl" we can't build cogl-sdl-hello
-# un-modified for emscripten since emscripten doesn't support
-# SDL_WaitEvent() and we need to use some special emscripten apis
-# to create a mainloop....
 if USING_EMSCRIPTEN
 
 programs += cogl-emscripten-hello
 cogl_emscripten_hello_SOURCES = cogl-emscripten-hello.c
 cogl_emscripten_hello_LDADD = $(common_ldadd)
 
-else # USING_EMSCRIPTEN
-
-if SUPPORT_SDL
-programs += cogl-sdl-hello
-cogl_sdl_hello_SOURCES = cogl-sdl-hello.c
-cogl_sdl_hello_LDADD = $(common_ldadd)
-endif
-
 endif # USING_EMSCRIPTEN
 
-if SUPPORT_SDL2
-programs += cogl-sdl2-hello
-cogl_sdl2_hello_SOURCES = cogl-sdl2-hello.c
-cogl_sdl2_hello_LDADD = $(common_ldadd)
-endif
-
 if USING_EMSCRIPTEN
 %.html: %.o $(top_builddir)/cogl/.libs/libcogl2.so $(top_builddir)/deps/glib/.libs/libglib.a
        $(CC) $(AM_CFLAGS) $(CFLAGS) --js-library $(top_srcdir)/examples/emscripten-example-js-library.js -o 
$@ $^


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]