Changeset View
Changeset View
Standalone View
Standalone View
source/blender/sequencer/intern/prefetch.c
| Show First 20 Lines • Show All 504 Lines • ▼ Show 20 Lines | if (context->scene->ed) { | ||||
| BLI_mutex_init(&pfjob->prefetch_suspend_mutex); | BLI_mutex_init(&pfjob->prefetch_suspend_mutex); | ||||
| BLI_condition_init(&pfjob->prefetch_suspend_cond); | BLI_condition_init(&pfjob->prefetch_suspend_cond); | ||||
| pfjob->bmain_eval = BKE_main_new(); | pfjob->bmain_eval = BKE_main_new(); | ||||
| pfjob->scene = context->scene; | pfjob->scene = context->scene; | ||||
| seq_prefetch_init_depsgraph(pfjob); | seq_prefetch_init_depsgraph(pfjob); | ||||
| } | } | ||||
| } | } | ||||
| seq_prefetch_update_scene(context->scene); | |||||
| seq_prefetch_update_context(context); | |||||
| pfjob->bmain = context->bmain; | pfjob->bmain = context->bmain; | ||||
| pfjob->cfra = cfra; | pfjob->cfra = cfra; | ||||
| pfjob->num_frames_prefetched = 1; | pfjob->num_frames_prefetched = 1; | ||||
| pfjob->waiting = false; | pfjob->waiting = false; | ||||
| pfjob->stop = false; | pfjob->stop = false; | ||||
| pfjob->running = true; | pfjob->running = true; | ||||
| seq_prefetch_update_scene(context->scene); | |||||
| seq_prefetch_update_context(context); | |||||
| BLI_threadpool_remove(&pfjob->threads, pfjob); | BLI_threadpool_remove(&pfjob->threads, pfjob); | ||||
| BLI_threadpool_insert(&pfjob->threads, pfjob); | BLI_threadpool_insert(&pfjob->threads, pfjob); | ||||
| return pfjob; | return pfjob; | ||||
| } | } | ||||
| /* Start or resume prefetching*/ | /* Start or resume prefetching*/ | ||||
| void BKE_sequencer_prefetch_start(const SeqRenderData *context, float timeline_frame, float cost) | void BKE_sequencer_prefetch_start(const SeqRenderData *context, float timeline_frame, float cost) | ||||
| ▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines | |||||