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-05 18:33:13 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-01-09 18:09:33 +0300
commitd2708b0f73d5f0e0a40b36da21c6a0d15405e739 (patch)
tree53d699a0a7701dbe009234633a38065e6f474cdf /source/blender/editors/space_sequencer/sequencer_scopes.c
parentf5d64b59f5152114cfa25a2b7433ed25204cb149 (diff)
Task scheduler: Get rid of extended version of parallel range callback
Wrap all arguments into TLS type of argument. Avoids some branching and also makes it easier to extend things in the future.
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_scopes.c')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_scopes.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.c b/source/blender/editors/space_sequencer/sequencer_scopes.c
index 80cb42c0b3d..4c060f12a4b 100644
--- a/source/blender/editors/space_sequencer/sequencer_scopes.c
+++ b/source/blender/editors/space_sequencer/sequencer_scopes.c
@@ -459,13 +459,13 @@ typedef struct MakeHistogramViewData {
} MakeHistogramViewData;
static void make_histogram_view_from_ibuf_byte_cb_ex(
- void *userdata, void *userdata_chunk, const int y, const int UNUSED(threadid))
+ void *userdata, const int y, const ParallelRangeTLS *tls)
{
MakeHistogramViewData *data = userdata;
const ImBuf *ibuf = data->ibuf;
const unsigned char *src = (unsigned char *)ibuf->rect;
- uint32_t (*cur_bins)[HIS_STEPS] = userdata_chunk;
+ uint32_t (*cur_bins)[HIS_STEPS] = tls->userdata_chunk;
for (int x = 0; x < ibuf->x; x++) {
const unsigned char *pixel = src + (y * ibuf->x + x) * 4;
@@ -548,13 +548,13 @@ BLI_INLINE int get_bin_float(float f)
}
static void make_histogram_view_from_ibuf_float_cb_ex(
- void *userdata, void *userdata_chunk, const int y, const int UNUSED(threadid))
+ void *userdata, const int y, const ParallelRangeTLS *tls)
{
const MakeHistogramViewData *data = userdata;
const ImBuf *ibuf = data->ibuf;
const float *src = ibuf->rect_float;
- uint32_t (*cur_bins)[HIS_STEPS] = userdata_chunk;
+ uint32_t (*cur_bins)[HIS_STEPS] = tls->userdata_chunk;
for (int x = 0; x < ibuf->x; x++) {
const float *pixel = src + (y * ibuf->x + x) * 4;