[cairo-commit] 3 commits - src/cairo-font.c src/cairo-ft-font.c src/cairoint.h src/cairo-mutex.c src/cairo-mutex-list.h src/cairo-mutex-private.h src/cairo-paginated-surface.c src/cairo-pattern.c src/cairo-scaled-font.c src/cairo-surface.c src/cairo-xlib-screen.c

Mathias Hasselmann hasselmm at kemper.freedesktop.org
Tue Mar 20 05:37:05 PDT 2007


 src/cairo-font.c              |    1 
 src/cairo-ft-font.c           |    1 
 src/cairo-mutex-list.h        |    4 ---
 src/cairo-mutex-private.h     |   53 ++++++++++++++++++++++++++++++++++--------
 src/cairo-mutex.c             |    6 +++-
 src/cairo-paginated-surface.c |    1 
 src/cairo-pattern.c           |    1 
 src/cairo-scaled-font.c       |    1 
 src/cairo-surface.c           |    1 
 src/cairo-xlib-screen.c       |    1 
 src/cairoint.h                |   37 -----------------------------
 11 files changed, 49 insertions(+), 58 deletions(-)

New commits:
diff-tree 94c367f7d7637fc74ed6d1fbe13d73662c08246b (from parents)
Merge: c4bd7cf6f85770552c0b0284db219f27ffa702f2 d3177a68752ac2c8d20b1a8a3616298f04f31078
Author: Mathias Hasselmann <mathias.hasselmann at gmx.de>
Date:   Tue Mar 20 13:33:50 2007 +0100

    Merge branch 'master' of git+ssh://hasselmm@git.freedesktop.org/git/cairo

diff --cc src/cairo-mutex-list.h
index 805e1b1,0e1606a..7c7bf8f
@@@ -42,7 -42,11 +42,7 @@@
  #endif
  
  #if CAIRO_HAS_XLIB_SURFACE
- CAIRO_MUTEX_DECLARE (_xlib_screen_mutex);
+ CAIRO_MUTEX_DECLARE (_cairo_xlib_screen_mutex);
  #endif
  
 -#if CAIRO_HAS_OS2_SURFACE
 -CAIRO_MUTEX_DECLARE (_global_image_glyph_cache_mutex);
 -#endif
 -
  #endif
diff-tree c4bd7cf6f85770552c0b0284db219f27ffa702f2 (from 9c52a9e7d8a70d21ecdd4fa241fa2594361dd5df)
Author: Mathias Hasselmann <mathias.hasselmann at gmx.de>
Date:   Tue Mar 20 13:32:33 2007 +0100

    Move declaration of cairo_mutex_t to cairo-mutex-private.h

diff --git a/src/cairo-font.c b/src/cairo-font.c
index a7503a4..f254c3b 100644
--- a/src/cairo-font.c
+++ b/src/cairo-font.c
@@ -39,7 +39,6 @@
  */
 
 #include "cairoint.h"
-#include "cairo-mutex-private.h"
 
 /* Forward declare so we can use it as an arbitrary backend for
  * _cairo_font_face_nil.
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index e4ceb02..7f10fd7 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -40,7 +40,6 @@
 #include <float.h>
 
 #include "cairo-ft-private.h"
-#include "cairo-mutex-private.h"
 
 #include <fontconfig/fontconfig.h>
 #include <fontconfig/fcfreetype.h>
diff --git a/src/cairo-mutex-private.h b/src/cairo-mutex-private.h
index 41d0049..8375ed5 100644
--- a/src/cairo-mutex-private.h
+++ b/src/cairo-mutex-private.h
@@ -40,9 +40,13 @@
 #ifndef CAIRO_MUTEX_PRIVATE_H
 #define CAIRO_MUTEX_PRIVATE_H
 
-#include "cairoint.h"
+CAIRO_BEGIN_DECLS
 
-#if HAVE_PTHREAD_H
+#if HAVE_PTHREAD_H /*********************************************************/
+
+# include <pthread.h>
+
+  typedef pthread_mutex_t cairo_mutex_t;
 
 # define CAIRO_MUTEX_INITIALIZE() /* no-op */
 # define CAIRO_MUTEX_LOCK(name) pthread_mutex_lock (&name)
@@ -54,7 +58,23 @@
 # define CAIRO_MUTEX_FINI(mutex) pthread_mutex_destroy (mutex)
 # define CAIRO_MUTEX_NIL_INITIALIZER PTHREAD_MUTEX_INITIALIZER
 
-#elif defined CAIRO_HAS_WIN32_SURFACE
+#elif defined CAIRO_HAS_WIN32_SURFACE /**************************************/
+
+/* We require Windows 2000 features. Although we don't use them here, things
+ * should still work if this header file ends up being the one to include
+ * windows.h into a source file, so: */
+# if !defined(WINVER) || (WINVER < 0x0500)
+#  define WINVER 0x0500
+# endif
+
+# if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500)
+#  define _WIN32_WINNT 0x0500
+# endif
+
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
+  typedef CRITICAL_SECTION cairo_mutex_t;
 
 # define CAIRO_MUTEX_LOCK(name) EnterCriticalSection (&name)
 # define CAIRO_MUTEX_UNLOCK(name) LeaveCriticalSection (&name)
@@ -62,7 +82,13 @@
 # define CAIRO_MUTEX_FINI(mutex) DeleteCriticalSection (mutex)
 # define CAIRO_MUTEX_NIL_INITIALIZER { NULL, 0, 0, NULL, NULL, 0 }
 
-#elif defined __OS2__
+#elif defined __OS2__ /******************************************************/
+
+# define INCL_BASE
+# define INCL_PM
+# include <os2.h>
+
+  typedef HMTX cairo_mutex_t;
 
 # define CAIRO_MUTEX_LOCK(name) DosRequestMutexSem(name, SEM_INDEFINITE_WAIT)
 # define CAIRO_MUTEX_UNLOCK(name) DosReleaseMutexSem(name)
@@ -75,10 +101,12 @@
 } while (0)
 # define CAIRO_MUTEX_NIL_INITIALIZER 0
 
-#elif defined CAIRO_HAS_BEOS_SURFACE
+#elif defined CAIRO_HAS_BEOS_SURFACE /***************************************/
+
+  typedef void* cairo_mutex_t;
 
-cairo_private void _cairo_beos_lock(cairo_mutex_t*);
-cairo_private void _cairo_beos_unlock(cairo_mutex_t*);
+  cairo_private void _cairo_beos_lock(cairo_mutex_t*);
+  cairo_private void _cairo_beos_unlock(cairo_mutex_t*);
 
 /* the real initialization takes place in a global constructor */
 # define CAIRO_MUTEX_LOCK(name) _cairo_beos_lock (&name)
@@ -92,12 +120,12 @@ cairo_private void _cairo_beos_unlock(ca
 # define CAIRO_MUTEX_FINI(mutex) ???
 # define CAIRO_MUTEX_NIL_INITIALIZER {}
 
-#else
+#else /**********************************************************************/
 
 # define CAIRO_MUTEX_LOCK(name)
 # define CAIRO_MUTEX_UNLOCK(name)
 
-#endif
+#endif  /********************************************************************/
 
 #ifndef CAIRO_MUTEX_DECLARE
 #define CAIRO_MUTEX_DECLARE(name) extern cairo_mutex_t name;
@@ -120,4 +148,11 @@ cairo_private void _cairo_mutex_initiali
 
 #endif
 
+CAIRO_END_DECLS
+
 #endif
+
+
+
+
+
diff --git a/src/cairo-mutex.c b/src/cairo-mutex.c
index 48ec86b..613d2c8 100644
--- a/src/cairo-mutex.c
+++ b/src/cairo-mutex.c
@@ -31,8 +31,10 @@
  *	Mathias Hasselmann <mathias.hasselmann at gmx.de>
  */
 
-#define CAIRO_MUTEX_DECLARE(name) cairo_mutex_t name = CAIRO_MUTEX_NIL_INITIALIZER;
-#include "cairo-mutex-private.h"
+#define CAIRO_MUTEX_DECLARE(name) \
+ cairo_mutex_t name = CAIRO_MUTEX_NIL_INITIALIZER;
+
+#include "cairoint.h"
 
 #if !HAVE_PTHREAD_H
 
diff --git a/src/cairo-paginated-surface.c b/src/cairo-paginated-surface.c
index c8c9a72..c8e4612 100644
--- a/src/cairo-paginated-surface.c
+++ b/src/cairo-paginated-surface.c
@@ -45,7 +45,6 @@
 #include "cairo-paginated-surface-private.h"
 #include "cairo-meta-surface-private.h"
 #include "cairo-analysis-surface-private.h"
-#include "cairo-mutex-private.h"
 
 typedef struct _cairo_paginated_surface {
     cairo_surface_t base;
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index 058d38e..2639071 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -29,7 +29,6 @@
  */
 
 #include "cairoint.h"
-#include "cairo-mutex-private.h"
 
 const cairo_solid_pattern_t cairo_pattern_nil = {
     { CAIRO_PATTERN_TYPE_SOLID, 	/* type */
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index af7b617..963c060 100755
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -37,7 +37,6 @@
  */
 
 #include "cairoint.h"
-#include "cairo-mutex-private.h"
 #include "cairo-scaled-font-test.h"
 
 static cairo_bool_t
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index a26e653..ada4b8e 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -39,7 +39,6 @@
 
 #include "cairoint.h"
 #include "cairo-surface-fallback-private.h"
-#include "cairo-mutex-private.h"
 #include "cairo-clip-private.h"
 
 #define DEFINE_NIL_SURFACE(status, name)			\
diff --git a/src/cairo-xlib-screen.c b/src/cairo-xlib-screen.c
index 5e5cad4..f6bae4b 100644
--- a/src/cairo-xlib-screen.c
+++ b/src/cairo-xlib-screen.c
@@ -55,7 +55,6 @@
 #include <string.h>
 
 #include "cairo-xlib-private.h"
-#include "cairo-mutex-private.h"
 
 #include <fontconfig/fontconfig.h>
 
diff --git a/src/cairoint.h b/src/cairoint.h
index 35fb83a..35f2117 100755
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -134,42 +134,6 @@ CAIRO_BEGIN_DECLS
 #define __attribute__(x)
 #endif
 
-#if HAVE_PTHREAD_H
-# include <pthread.h>
-
-  typedef pthread_mutex_t cairo_mutex_t;
-
-#elif defined CAIRO_HAS_WIN32_SURFACE
-
-/* We require Windows 2000 features. Although we don't use them here, things
- * should still work if this header file ends up being the one to include
- * windows.h into a source file, so: */
-# if !defined(WINVER) || (WINVER < 0x0500)
-#  define WINVER 0x0500
-# endif
-
-# if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500)
-#  define _WIN32_WINNT 0x0500
-# endif
-
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-
-  typedef CRITICAL_SECTION cairo_mutex_t;
-
-#elif defined CAIRO_HAS_OS2_SURFACE
-# define INCL_BASE
-# define INCL_PM
-# include <os2.h>
-
-  typedef HMTX cairo_mutex_t;
-
-#elif defined CAIRO_HAS_BEOS_SURFACE
-
-  typedef void* cairo_mutex_t;
-
-#endif
-
 #undef MIN
 #define MIN(a, b) ((a) < (b) ? (a) : (b))
 
@@ -203,6 +167,7 @@ do {					\
 
 #define CAIRO_REF_COUNT_INVALID ((unsigned int) -1)
 
+#include "cairo-mutex-private.h"
 #include "cairo-wideint-private.h"
 
 typedef int32_t		cairo_fixed_16_16_t;
diff-tree 9c52a9e7d8a70d21ecdd4fa241fa2594361dd5df (from be52178443ffd19fc7848dfc78c477883ccb943b)
Author: Mathias Hasselmann <mathias.hasselmann at gmx.de>
Date:   Tue Mar 20 13:05:48 2007 +0100

    Remove _global_image_glyph_cache_mutex which is not used anymore.

diff --git a/src/cairo-mutex-list.h b/src/cairo-mutex-list.h
index c624242..805e1b1 100644
--- a/src/cairo-mutex-list.h
+++ b/src/cairo-mutex-list.h
@@ -45,8 +45,4 @@ CAIRO_MUTEX_DECLARE (_cairo_ft_unscaled_
 CAIRO_MUTEX_DECLARE (_xlib_screen_mutex);
 #endif
 
-#if CAIRO_HAS_OS2_SURFACE
-CAIRO_MUTEX_DECLARE (_global_image_glyph_cache_mutex);
-#endif
-
 #endif


More information about the cairo-commit mailing list