diff options
author | Hans Goudey <h.goudey@me.com> | 2022-11-11 04:14:48 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-11-11 04:41:13 +0300 |
commit | 9465b109af0b70244a36f9e68493e316d9f8b56f (patch) | |
tree | c4d933bf09f8313071556063156538ec3356b24c /source/blender/editors/space_clip/clip_editor.c | |
parent | 026d21a225521670c6b5083da9da61227da69e65 (diff) | |
parent | ca1642cd0c5cdf634fe2022c955d93983de95934 (diff) |
Merge branch 'master' into refactor-mesh-position-genericrefactor-mesh-position-generic
Diffstat (limited to 'source/blender/editors/space_clip/clip_editor.c')
-rw-r--r-- | source/blender/editors/space_clip/clip_editor.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index 9a690f36aab..10a037a1c3c 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -676,8 +676,8 @@ typedef struct PrefetchQueue { SpinLock spin; - short *stop; - short *do_update; + bool *stop; + bool *do_update; float *progress; } PrefetchQueue; @@ -819,7 +819,7 @@ static uchar *prefetch_thread_next_frame(PrefetchQueue *queue, (queue->initial_frame - queue->current_frame); } - *queue->do_update = 1; + *queue->do_update = true; *queue->progress = (float)frames_processed / (queue->end_frame - queue->start_frame); } } @@ -868,7 +868,7 @@ static void prefetch_task_func(TaskPool *__restrict pool, void *task_data) if (!result) { /* no more space in the cache, stop reading frames */ - *queue->stop = 1; + *queue->stop = true; break; } } @@ -880,8 +880,8 @@ static void start_prefetch_threads(MovieClip *clip, int end_frame, short render_size, short render_flag, - short *stop, - short *do_update, + bool *stop, + bool *do_update, float *progress) { int tot_thread = BLI_task_scheduler_num_threads(); @@ -918,7 +918,7 @@ static bool prefetch_movie_frame(MovieClip *clip, int frame, short render_size, short render_flag, - short *stop) + bool *stop) { MovieClipUser user = *DNA_struct_default_get(MovieClipUser); @@ -940,14 +940,14 @@ static bool prefetch_movie_frame(MovieClip *clip, if (!result) { /* no more space in the cache, we could stop prefetching here */ - *stop = 1; + *stop = true; } IMB_freeImBuf(ibuf); } else { /* error reading frame, fair enough stop attempting further reading */ - *stop = 1; + *stop = true; } } @@ -961,8 +961,8 @@ static void do_prefetch_movie(MovieClip *clip, int end_frame, short render_size, short render_flag, - short *stop, - short *do_update, + bool *stop, + bool *do_update, float *progress) { int frame; @@ -976,7 +976,7 @@ static void do_prefetch_movie(MovieClip *clip, frames_processed++; - *do_update = 1; + *do_update = true; *progress = (float)frames_processed / (end_frame - start_frame); } @@ -988,12 +988,12 @@ static void do_prefetch_movie(MovieClip *clip, frames_processed++; - *do_update = 1; + *do_update = true; *progress = (float)frames_processed / (end_frame - start_frame); } } -static void prefetch_startjob(void *pjv, short *stop, short *do_update, float *progress) +static void prefetch_startjob(void *pjv, bool *stop, bool *do_update, float *progress) { PrefetchJob *pj = pjv; |