[gegl] buffer: don't acquire tile storage lock in NN sampler ...
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] buffer: don't acquire tile storage lock in NN sampler ...
- Date: Thu, 15 Sep 2016 15:29:18 +0000 (UTC)
commit eb33c65ea8f143d0dd811fe43b3dd4576e08673c
Author: Ell <ell_se yahoo com>
Date: Thu Sep 15 08:17:30 2016 +0000
buffer: don't acquire tile storage lock in NN sampler ...
... when not using multithreading
gegl/buffer/gegl-sampler-nearest.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gegl/buffer/gegl-sampler-nearest.c b/gegl/buffer/gegl-sampler-nearest.c
index 956d78d..4ec2cab 100644
--- a/gegl/buffer/gegl-sampler-nearest.c
+++ b/gegl/buffer/gegl-sampler-nearest.c
@@ -131,7 +131,8 @@ gegl_sampler_get_pixel (GeglSampler *sampler,
}
gegl_buffer_lock (sampler->buffer);
- g_rec_mutex_lock (&buffer->tile_storage->mutex);
+ if (gegl_config_threads()>1)
+ g_rec_mutex_lock (&buffer->tile_storage->mutex);
{
gint tile_width = buffer->tile_width;
@@ -166,7 +167,8 @@ gegl_sampler_get_pixel (GeglSampler *sampler,
babl_process (sampler->fish, tp, buf, 1);
}
}
- g_rec_mutex_unlock (&buffer->tile_storage->mutex);
+ if (gegl_config_threads()>1)
+ g_rec_mutex_unlock (&buffer->tile_storage->mutex);
gegl_buffer_unlock (sampler->buffer);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]