[gegl] buffer: don't cache thread count in gegl_buffer_get_tile()
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] buffer: don't cache thread count in gegl_buffer_get_tile()
- Date: Sat, 29 Jul 2017 14:40:35 +0000 (UTC)
commit 4b78e3a12d7339effc74437393b4b7e490f03cfb
Author: Ell <ell_se yahoo com>
Date: Sat Jul 29 10:30:08 2017 -0400
buffer: don't cache thread count in gegl_buffer_get_tile()
Otherwise, if the thread count changes from 1 to >1 after the
function has already been called, we fail to lock the storage
mutex upon future calls.
gegl/buffer/gegl-buffer.c | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer.c b/gegl/buffer/gegl-buffer.c
index d832f27..aca8adb 100644
--- a/gegl/buffer/gegl-buffer.c
+++ b/gegl/buffer/gegl-buffer.c
@@ -1208,16 +1208,9 @@ gegl_buffer_get_tile (GeglBuffer *buffer,
GeglTileSource *source = (GeglTileSource*)buffer;
GeglTile *tile;
- static int threaded = -1;
-
- if (threaded == -1)
- {
- threaded = gegl_config_threads () > 1;
- }
-
g_assert (source);
- if (threaded)
+ if (gegl_config_threads () > 1)
{
GeglTileStorage *tile_storage = buffer->tile_storage;
g_assert (tile_storage);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]