diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-01-08 13:35:48 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-01-09 18:09:33 +0300 |
commit | 4c4a7e84c64472e38811933646f3fefeb071b0b4 (patch) | |
tree | 5145108f3689d4a24e6ed66137165896eeba43f6 /source/blender/modifiers/intern/MOD_uvwarp.c | |
parent | d2708b0f73d5f0e0a40b36da21c6a0d15405e739 (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/modifiers/intern/MOD_uvwarp.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_uvwarp.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_uvwarp.c b/source/blender/modifiers/intern/MOD_uvwarp.c index 99dc7a7bd92..61e57152dfd 100644 --- a/source/blender/modifiers/intern/MOD_uvwarp.c +++ b/source/blender/modifiers/intern/MOD_uvwarp.c @@ -210,7 +210,13 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, UVWarpData data = {.mpoly = mpoly, .mloop = mloop, .mloopuv = mloopuv, .dvert = dvert, .defgrp_index = defgrp_index, .warp_mat = warp_mat, .axis_u = axis_u, .axis_v = axis_v}; - BLI_task_parallel_range(0, numPolys, &data, uv_warp_compute, numPolys > 1000); + ParallelRangeSettings settings; + BLI_parallel_range_settings_defaults(&settings); + settings.use_threading = (numPolys > 1000); + BLI_task_parallel_range(0, numPolys, + &data, + uv_warp_compute, + &settings); dm->dirty |= DM_DIRTY_TESS_CDLAYERS; |