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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2020-04-09 16:51:44 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2020-04-09 20:18:14 +0300
commit78f56d5582d71e001cc1326b7182aa39f9bdedec (patch)
tree4d7a1d97a4691302d912da441d072a6b511d554d /source/blender/imbuf/intern/imageprocess.c
parent862ec829422241878b3345661476d8551935aed2 (diff)
TaskScheduler: Minor Preparations for TBB
Tasks: move priority from task to task pool {rBf7c18df4f599fe39ffc914e645e504fcdbee8636} Tasks: split task.c into task_pool.cc and task_iterator.c {rB4ada1d267749931ca934a74b14a82479bcaa92e0} Differential Revision: https://developer.blender.org/D7385
Diffstat (limited to 'source/blender/imbuf/intern/imageprocess.c')
-rw-r--r--source/blender/imbuf/intern/imageprocess.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c
index 523b57cc162..aa82487d69f 100644
--- a/source/blender/imbuf/intern/imageprocess.c
+++ b/source/blender/imbuf/intern/imageprocess.c
@@ -360,7 +360,7 @@ void IMB_processor_apply_threaded(
int total_tasks = (buffer_lines + lines_per_task - 1) / lines_per_task;
int i, start_line;
- task_pool = BLI_task_pool_create(task_scheduler, do_thread);
+ task_pool = BLI_task_pool_create(task_scheduler, do_thread, TASK_PRIORITY_LOW);
handles = MEM_callocN(handle_size * total_tasks, "processor apply threaded handles");
@@ -379,7 +379,7 @@ void IMB_processor_apply_threaded(
init_handle(handle, start_line, lines_per_current_task, init_customdata);
- BLI_task_pool_push(task_pool, processor_apply_func, handle, false, TASK_PRIORITY_LOW);
+ BLI_task_pool_push(task_pool, processor_apply_func, handle, false, NULL);
start_line += lines_per_task;
}
@@ -421,13 +421,10 @@ void IMB_processor_apply_threaded_scanlines(int total_scanlines,
data.total_scanlines = total_scanlines;
const int total_tasks = (total_scanlines + scanlines_per_task - 1) / scanlines_per_task;
TaskScheduler *task_scheduler = BLI_task_scheduler_get();
- TaskPool *task_pool = BLI_task_pool_create(task_scheduler, &data);
+ TaskPool *task_pool = BLI_task_pool_create(task_scheduler, &data, TASK_PRIORITY_LOW);
for (int i = 0, start_line = 0; i < total_tasks; i++) {
- BLI_task_pool_push(task_pool,
- processor_apply_scanline_func,
- POINTER_FROM_INT(start_line),
- false,
- TASK_PRIORITY_LOW);
+ BLI_task_pool_push(
+ task_pool, processor_apply_scanline_func, POINTER_FROM_INT(start_line), false, NULL);
start_line += scanlines_per_task;
}