[clutter/wip/cogl-winsys-egl: 24/30] cogl: remove OSX/WIN32 specific bits in favour of a stub winsys



commit 943837c034b75487c121df2cc6871fe2412b3861
Author: Robert Bragg <robert linux intel com>
Date:   Mon Apr 18 17:45:36 2011 +0100

    cogl: remove OSX/WIN32 specific bits in favour of a stub winsys

 clutter/cogl/cogl/Makefile.am                |    8 +-----
 clutter/cogl/cogl/winsys/cogl-winsys-osx.c   |   35 --------------------------
 clutter/cogl/cogl/winsys/cogl-winsys-stub.c  |    5 +++
 clutter/cogl/cogl/winsys/cogl-winsys-win32.c |   35 --------------------------
 clutter/cogl/configure.ac                    |    6 +---
 clutter/win32/clutter-backend-win32.c        |    2 +-
 6 files changed, 8 insertions(+), 83 deletions(-)
---
diff --git a/clutter/cogl/cogl/Makefile.am b/clutter/cogl/cogl/Makefile.am
index a492bfe..43a57b3 100644
--- a/clutter/cogl/cogl/Makefile.am
+++ b/clutter/cogl/cogl/Makefile.am
@@ -341,14 +341,8 @@ if SUPPORT_EGL_PLATFORM_GDL
 cogl_sources_c += \
        $(srcdir)/winsys/cogl-winsys-egl.c
 endif
-if SUPPORT_WIN32
+if SUPPORT_STUB
 cogl_sources_c += \
-       $(srcdir)/winsys/cogl-winsys-win32.c \
-       $(srcdir)/winsys/cogl-winsys-stub.c
-endif
-if SUPPORT_OSX
-cogl_sources_c += \
-       $(srcdir)/winsys/cogl-winsys-osx.c \
        $(srcdir)/winsys/cogl-winsys-stub.c
 endif
 
diff --git a/clutter/cogl/cogl/winsys/cogl-winsys-stub.c b/clutter/cogl/cogl/winsys/cogl-winsys-stub.c
index 6648150..c266d2d 100644
--- a/clutter/cogl/cogl/winsys/cogl-winsys-stub.c
+++ b/clutter/cogl/cogl/winsys/cogl-winsys-stub.c
@@ -32,6 +32,11 @@
  * calls into the winsys layer with #ifdef COGL_HAS_FULL_WINSYS
  */
 
+CoglFuncPtr
+_cogl_winsys_get_proc_address (const char *name)
+{
+  return NULL;
+}
 
 void
 _cogl_winsys_onscreen_swap_buffers (CoglOnscreen *onscreen)
diff --git a/clutter/cogl/configure.ac b/clutter/cogl/configure.ac
index c1f7d5e..5433b12 100644
--- a/clutter/cogl/configure.ac
+++ b/clutter/cogl/configure.ac
@@ -399,6 +399,7 @@ AS_IF([test "x$enable_stub_winsys" = "xyes"],
         GL_WINSYS_APIS="$GL_WINSYS_APIS stub"
         ALLOW_GLX=no
       ])
+AM_CONDITIONAL(SUPPORT_STUB, [test "x$enable_stub_winsys" = "xyes"])
 
 AC_ARG_ENABLE(
   [glx],
@@ -564,11 +565,6 @@ AM_CONDITIONAL(SUPPORT_XLIB, [test "x$SUPPORT_XLIB" = "xyes"])
 
 AM_CONDITIONAL(COGL_STANDALONE_BUILD, [true])
 
-AM_CONDITIONAL(SUPPORT_OSX, [false])
-AM_CONDITIONAL(SUPPORT_WIN32, [false])
-AM_CONDITIONAL(SUPPORT_WAYLAND, [false])
-
-
 dnl ================================================================
 dnl Compiler stuff.
 dnl ================================================================
diff --git a/clutter/win32/clutter-backend-win32.c b/clutter/win32/clutter-backend-win32.c
index a5c367f..04e469d 100644
--- a/clutter/win32/clutter-backend-win32.c
+++ b/clutter/win32/clutter-backend-win32.c
@@ -229,7 +229,7 @@ clutter_backend_win32_get_features (ClutterBackend *backend)
     CLUTTER_NOTE (BACKEND, "vblank sync: left at default at user request");
   else if (cogl_clutter_check_extension ("WGL_EXT_swap_control", extensions)
 	   && (swap_interval = (SwapIntervalProc)
-	       cogl_get_proc_address ("wglSwapIntervalEXT")))
+	       wglGetProcAddress ((LPCSTR) "wglSwapIntervalEXT")))
     {
       /* According to the specification for the WGL_EXT_swap_control
 	 extension the default swap interval is 1 anyway, so if no



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