[gegl] operations: Replace GStaticMutex with static GMutex



commit 4462b07cb9d1e2d2c8ddb0d1fd38675b9a483cde
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Tue Oct 1 18:58:51 2013 -0700

    operations: Replace GStaticMutex with static GMutex

 operations/common/cartoon.c         |    6 +++---
 operations/common/photocopy.c       |    6 +++---
 operations/common/wind.c            |    6 +++---
 operations/external/path.c          |    6 +++---
 operations/external/vector-fill.c   |    6 +++---
 operations/external/vector-stroke.c |    6 +++---
 6 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/operations/common/cartoon.c b/operations/common/cartoon.c
index 2424171..f0fe185 100644
--- a/operations/common/cartoon.c
+++ b/operations/common/cartoon.c
@@ -249,14 +249,14 @@ process (GeglOperation       *operation,
   gfloat *dst_buf;
   GeglRectangle *whole_region;
 
-  static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
+  static GMutex mutex = { 0, };
 
   dst_buf = g_slice_alloc (result->width * result->height * 4 * sizeof(gfloat));
 
   gegl_buffer_get (input, result, 1.0, babl_format ("Y'CbCrA float"), dst_buf, GEGL_AUTO_ROWSTRIDE, 
GEGL_ABYSS_NONE);
 
 
-  g_static_mutex_lock (&mutex);
+  g_mutex_lock (&mutex);
   if(o->chant_data == NULL)
     {
       whole_region = gegl_operation_source_get_bounding_box (operation, "input");
@@ -267,7 +267,7 @@ process (GeglOperation       *operation,
       ramps->prev_mask_radius = o->mask_radius;
       ramps->prev_pct_black   = o->pct_black;
     }
-  g_static_mutex_unlock (&mutex);
+  g_mutex_unlock (&mutex);
 
   gegl_buffer_set_extent (input, result);
   grey_blur_buffer (input, o->mask_radius, &dest1, &dest2);
diff --git a/operations/common/photocopy.c b/operations/common/photocopy.c
index 17ddf8d..f49b5b3 100644
--- a/operations/common/photocopy.c
+++ b/operations/common/photocopy.c
@@ -275,12 +275,12 @@ process (GeglOperation       *operation,
   gfloat* ptr1;
   gfloat* ptr2;
 
-  static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
+  static GMutex mutex = { 0, };
 
   total_pixels = result->width * result->height;
   dst_buf = g_slice_alloc (total_pixels * sizeof (gfloat));
 
-  g_static_mutex_lock (&mutex);
+  g_mutex_lock (&mutex);
   if (o->chant_data == NULL)
     {
       o->chant_data = g_slice_new (Ramps);
@@ -296,7 +296,7 @@ process (GeglOperation       *operation,
       ramps->prev_black       = o->black;
       ramps->prev_white       = o->white;
     }
-  g_static_mutex_unlock (&mutex);
+  g_mutex_unlock (&mutex);
 
   grey_blur_buffer (input, o->sharpness, o->mask_radius, &dest1, &dest2);
 
diff --git a/operations/common/wind.c b/operations/common/wind.c
index c465499..b10ef41 100644
--- a/operations/common/wind.c
+++ b/operations/common/wind.c
@@ -207,9 +207,9 @@ process (GeglOperation       *operation,
 
   GHashTable *bleed_table;
 
-  static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
+  static GMutex mutex = { 0, };
 
-  g_static_mutex_lock (&mutex);
+  g_mutex_lock (&mutex);
   if (!o->chant_data)
     {
       GeglRectangle *whole_rect = gegl_operation_source_get_bounding_box (operation, "input");
@@ -220,7 +220,7 @@ process (GeglOperation       *operation,
       o->chant_data = bleed_table;
       gegl_buffer_linear_close (input, data);
     }
-  g_static_mutex_unlock (&mutex);
+  g_mutex_unlock (&mutex);
 
   bleed_table = (GHashTable*) o->chant_data;
 
diff --git a/operations/external/path.c b/operations/external/path.c
index bad2d41..f44edf4 100644
--- a/operations/external/path.c
+++ b/operations/external/path.c
@@ -381,12 +381,12 @@ process (GeglOperation       *operation,
       a *= o->fill_opacity;
       if (a>0.001)
         {
-          GStaticMutex mutex = G_STATIC_MUTEX_INIT;
+          static GMutex mutex = { 0, };
           cairo_t *cr;
           cairo_surface_t *surface;
           guchar *data;
 
-          g_static_mutex_lock (&mutex);
+          g_mutex_lock (&mutex);
           data = (void*)gegl_buffer_linear_open (output, result, NULL, babl_format ("B'aG'aR'aA u8"));
           surface = cairo_image_surface_create_for_data (data,
                                                          CAIRO_FORMAT_ARGB32,
@@ -405,7 +405,7 @@ process (GeglOperation       *operation,
           cairo_set_source_rgba (cr, r,g,b,a);
           cairo_fill (cr);
 
-          g_static_mutex_unlock (&mutex);
+          g_mutex_unlock (&mutex);
           gegl_buffer_linear_close (output, data);
         }
     }
diff --git a/operations/external/vector-fill.c b/operations/external/vector-fill.c
index bd238fc..aaf28cc 100644
--- a/operations/external/vector-fill.c
+++ b/operations/external/vector-fill.c
@@ -143,13 +143,13 @@ process (GeglOperation       *operation,
 
   if (need_fill)
     {
-      GStaticMutex mutex = G_STATIC_MUTEX_INIT;
+      static GMutex mutex = { 0, };
       cairo_t *cr;
       cairo_surface_t *surface;
       guchar *data;
 
 
-      g_static_mutex_lock (&mutex);
+      g_mutex_lock (&mutex);
       data = (void*)gegl_buffer_linear_open (output, result, NULL, babl_format ("B'aG'aR'aA u8"));
       surface = cairo_image_surface_create_for_data (data,
                                                      CAIRO_FORMAT_ARGB32,
@@ -168,7 +168,7 @@ process (GeglOperation       *operation,
       cairo_destroy (cr);
 
       gegl_buffer_linear_close (output, data);
-      g_static_mutex_unlock (&mutex);
+      g_mutex_unlock (&mutex);
     }
   return  TRUE;
 }
diff --git a/operations/external/vector-stroke.c b/operations/external/vector-stroke.c
index 609a88e..b400cf2 100644
--- a/operations/external/vector-stroke.c
+++ b/operations/external/vector-stroke.c
@@ -169,12 +169,12 @@ process (GeglOperation       *operation,
 
   if (need_stroke)
     {
-      GStaticMutex mutex = G_STATIC_MUTEX_INIT;
+      static GMutex mutex = { 0, };
       cairo_t *cr;
       cairo_surface_t *surface;
       guchar *data;
 
-      g_static_mutex_lock (&mutex);
+      g_mutex_lock (&mutex);
       data = (void*)gegl_buffer_linear_open (output, result, NULL, babl_format ("B'aG'aR'aA u8"));
       surface = cairo_image_surface_create_for_data (data,
                                                      CAIRO_FORMAT_ARGB32,
@@ -196,7 +196,7 @@ process (GeglOperation       *operation,
       cairo_destroy (cr);
 
       gegl_buffer_linear_close (output, data);
-      g_static_mutex_unlock (&mutex);
+      g_mutex_unlock (&mutex);
     }
   return  TRUE;
 }


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