[gegl] buffer: fix race condition in GeglTileBackendSwap
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] buffer: fix race condition in GeglTileBackendSwap
- Date: Mon, 17 Dec 2018 14:52:42 +0000 (UTC)
commit c130b8be9dc43458c752f199c2851629de91a18c
Author: Ell <ell_se yahoo com>
Date: Mon Dec 17 09:50:59 2018 -0500
buffer: fix race condition in GeglTileBackendSwap
... when compressing a tile before pushing to the queue in one
thread, while changing the swap compression algorithm in another
thread.
gegl/buffer/gegl-tile-backend-swap.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile-backend-swap.c b/gegl/buffer/gegl-tile-backend-swap.c
index 98d48aec6..3c8933d09 100644
--- a/gegl/buffer/gegl-tile-backend-swap.c
+++ b/gegl/buffer/gegl-tile-backend-swap.c
@@ -235,7 +235,7 @@ gegl_tile_backend_swap_push_queue (ThreadParams *params,
{
queue_stalls++;
- if (params->tile && compression)
+ if (params->tile && params->block->compression)
{
gint bpp = babl_format_get_bytes_per_pixel (params->format);
gpointer compressed;
@@ -247,7 +247,8 @@ gegl_tile_backend_swap_push_queue (ThreadParams *params,
max_compressed_size = params->size * COMPRESSION_MAX_RATIO;
compressed = g_malloc (max_compressed_size);
- if (gegl_compression_compress (compression, params->format,
+ if (gegl_compression_compress (params->block->compression,
+ params->format,
gegl_tile_get_data (params->tile),
params->size / bpp,
compressed, &compressed_size,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]