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:
authorJeroen Bakker <jbakker>2021-06-11 16:55:09 +0300
committerJeroen Bakker <jeroen@blender.org>2021-06-11 16:55:22 +0300
commit7b30a3e98def6f9f158da0e315b7077655acfd20 (patch)
tree0299bf5e27e36e9f6c9b26ce8d2beb4452a95463 /source/blender/imbuf/intern/rectop.c
parent7b76a160a4647b17c1a55da4bd40e8f549225568 (diff)
Performance: Use parallel range for ImBuf scanline processor.
Scanline processor did its own heurestic what didn't scale well when having a multiple cores. In stead of using our own code this patch will leave it to TBB to determine how to split the scanlines over the available threads. Performance of the IMB_transform before this change was 0.002123s, with this change 0.001601s. This change increases performance in other areas as well including color management conversions. Reviewed By: zeddb Differential Revision: https://developer.blender.org/D11578
Diffstat (limited to 'source/blender/imbuf/intern/rectop.c')
-rw-r--r--source/blender/imbuf/intern/rectop.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c
index 6ae93def50f..4b5d68b9c13 100644
--- a/source/blender/imbuf/intern/rectop.c
+++ b/source/blender/imbuf/intern/rectop.c
@@ -988,8 +988,9 @@ typedef struct RectBlendThreadData {
bool accumulate;
} RectBlendThreadData;
-static void rectblend_thread_do(void *data_v, int start_scanline, int num_scanlines)
+static void rectblend_thread_do(void *data_v, int scanline)
{
+ const int num_scanlines = 1;
RectBlendThreadData *data = (RectBlendThreadData *)data_v;
IMB_rectblend(data->dbuf,
data->obuf,
@@ -999,11 +1000,11 @@ static void rectblend_thread_do(void *data_v, int start_scanline, int num_scanli
data->texmask,
data->mask_max,
data->destx,
- data->desty + start_scanline,
+ data->desty + scanline,
data->origx,
- data->origy + start_scanline,
+ data->origy + scanline,
data->srcx,
- data->srcy + start_scanline,
+ data->srcy + scanline,
data->width,
num_scanlines,
data->mode,