Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-01-08 13:35:48 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-01-09 18:09:33 +0300
commit4c4a7e84c64472e38811933646f3fefeb071b0b4 (patch)
tree5145108f3689d4a24e6ed66137165896eeba43f6 /source/blender/editors/sculpt_paint/paint_cursor.c
parentd2708b0f73d5f0e0a40b36da21c6a0d15405e739 (diff)
Task scheduler: Use single parallel range function with more flexible function
Now all the fine-tuning is happening using parallel range settings structure, which avoid passing long lists of arguments, allows extend fine-tuning further, avoid having lots of various functions which basically does the same thing.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_cursor.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 1378952c4cc..84e75f0e7fc 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -318,7 +318,9 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima
.pool = pool, .size = size, .rotation = rotation, .radius = radius,
};
- BLI_task_parallel_range_ex(0, size, &data, NULL, 0, load_tex_task_cb_ex, true, false);
+ ParallelRangeSettings settings;
+ BLI_parallel_range_settings_defaults(&settings);
+ BLI_task_parallel_range(0, size, &data, load_tex_task_cb_ex, &settings);
if (mtex->tex && mtex->tex->nodetree)
ntreeTexEndExecTree(mtex->tex->nodetree->execdata);
@@ -447,7 +449,9 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom)
.br = br, .buffer = buffer, .size = size,
};
- BLI_task_parallel_range(0, size, &data, load_tex_cursor_task_cb, true);
+ ParallelRangeSettings settings;
+ BLI_parallel_range_settings_defaults(&settings);
+ BLI_task_parallel_range(0, size, &data, load_tex_cursor_task_cb, &settings);
if (!cursor_snap.overlay_texture)
glGenTextures(1, &cursor_snap.overlay_texture);