[cairo-commit] src/cairo-win32-surface.c

Carl Worth cworth at kemper.freedesktop.org
Sat Mar 3 22:50:33 PST 2007


 src/cairo-win32-surface.c |    3 +++
 1 files changed, 3 insertions(+)

New commits:
diff-tree 325e75239098e640ed05ade39ec2b9f74ae30d3d (from 5f2b5f1f92d74fbc2d8f97fb547e160e370d4c40)
Author: Hans Breuer <hans at breuer.org>
Date:   Sat Mar 3 22:50:16 2007 -0800

    Fix mutex initialization for win32 (missing cairo_font_face_mutex)
    
    We've currently got a problem where it's easy to add a mutex
    for a POSIX system and easy to forget to add its intialization
    for other systems. Behdad has cooked up a plan for fixing this
    properly:
    
    	http://lists.freedesktop.org/archives/cairo/2007-February/009679.html
    
    In the meantime, we'll just kkeping breaking things, and patches
    like this will be needed to fix up our mistakes.
    
    This fix closes the following bug report:
    
    	cairo_font_face_mutex missing from cairo-win32-surface.c
    	https://bugs.freedesktop.org/show_bug.cgi?id=10175

diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
index dba6f6b..3599202 100644
--- a/src/cairo-win32-surface.c
+++ b/src/cairo-win32-surface.c
@@ -1898,6 +1898,7 @@ static const cairo_surface_backend_t cai
 CRITICAL_SECTION cairo_toy_font_face_hash_table_mutex;
 CRITICAL_SECTION cairo_scaled_font_map_mutex;
 CRITICAL_SECTION cairo_ft_unscaled_font_map_mutex;
+CRITICAL_SECTION cairo_font_face_mutex;
 
 static int _cairo_win32_initialized = 0;
 
@@ -1910,6 +1911,7 @@ _cairo_win32_initialize (void) {
     InitializeCriticalSection (&cairo_toy_font_face_hash_table_mutex);
     InitializeCriticalSection (&cairo_scaled_font_map_mutex);
     InitializeCriticalSection (&cairo_ft_unscaled_font_map_mutex);
+    InitializeCriticalSection (&cairo_font_face_mutex);
 
     _cairo_win32_initialized = 1;
 }
@@ -1929,6 +1931,7 @@ DllMain (HINSTANCE hinstDLL,
     DeleteCriticalSection (&cairo_toy_font_face_hash_table_mutex);
     DeleteCriticalSection (&cairo_scaled_font_map_mutex);
     DeleteCriticalSection (&cairo_ft_unscaled_font_map_mutex);
+    DeleteCriticalSection (&cairo_font_face_mutex);
     break;
   }
   return TRUE;


More information about the cairo-commit mailing list