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

Behdad Esfahbod behdad at kemper.freedesktop.org
Fri Feb 8 14:38:10 PST 2008


 src/cairo-xlib-surface.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit e68584d3a16da7db30bc53a42fa8367c8356bd7e
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Feb 8 17:36:59 2008 -0500

    [xlib] Move multiple CAIRO_MUTEX_INITIALIZE into one place they all end up anyway

diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index a555322..3fcee05 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -1946,6 +1946,8 @@ _cairo_xlib_surface_create_internal (Display		       *dpy,
     cairo_xlib_surface_t *surface;
     cairo_xlib_screen_info_t *screen_info;
 
+    CAIRO_MUTEX_INITIALIZE ();
+
     screen_info = _cairo_xlib_screen_info_get (dpy, screen);
     if (screen_info == NULL)
 	return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
@@ -2093,8 +2095,6 @@ cairo_xlib_surface_create (Display     *dpy,
     if (screen == NULL)
 	return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_VISUAL));
 
-    CAIRO_MUTEX_INITIALIZE ();
-
     return _cairo_xlib_surface_create_internal (dpy, drawable, screen,
 						visual, NULL, width, height, 0);
 }
@@ -2119,8 +2119,6 @@ cairo_xlib_surface_create_for_bitmap (Display  *dpy,
 				      int	width,
 				      int	height)
 {
-    CAIRO_MUTEX_INITIALIZE ();
-
     return _cairo_xlib_surface_create_internal (dpy, bitmap, screen,
 						NULL, NULL, width, height, 1);
 }
@@ -2154,8 +2152,6 @@ cairo_xlib_surface_create_with_xrender_format (Display		    *dpy,
 					       int		    width,
 					       int		    height)
 {
-    CAIRO_MUTEX_INITIALIZE ();
-
     return _cairo_xlib_surface_create_internal (dpy, drawable, screen,
 						NULL, format, width, height, 0);
 }


More information about the cairo-commit mailing list