Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/seqprefetch.c
| Show First 20 Lines • Show All 389 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| PrefetchJob *pfjob = seq_prefetch_job_get(context->scene); | PrefetchJob *pfjob = seq_prefetch_job_get(context->scene); | ||||
| if (!pfjob) { | if (!pfjob) { | ||||
| if (context->scene->ed) { | if (context->scene->ed) { | ||||
| pfjob = (PrefetchJob *)MEM_callocN(sizeof(PrefetchJob), "PrefetchJob"); | pfjob = (PrefetchJob *)MEM_callocN(sizeof(PrefetchJob), "PrefetchJob"); | ||||
| context->scene->ed->prefetch_job = pfjob; | context->scene->ed->prefetch_job = pfjob; | ||||
| BLI_threadpool_init(&pfjob->threads, seq_prefetch_frames, 1); | BLI_threadpool_init(&pfjob->threads, seq_prefetch_frames, 1, "SeqPrefetch"); | ||||
| 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 = context->bmain; | pfjob->bmain = context->bmain; | ||||
| 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); | ||||
| ▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines | |||||