Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/seqprefetch.c
| Show All 36 Lines | |||||
| #include "BLI_threads.h" | #include "BLI_threads.h" | ||||
| #include "IMB_imbuf.h" | #include "IMB_imbuf.h" | ||||
| #include "IMB_imbuf_types.h" | #include "IMB_imbuf_types.h" | ||||
| #include "BKE_anim_data.h" | #include "BKE_anim_data.h" | ||||
| #include "BKE_animsys.h" | #include "BKE_animsys.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_global.h" | |||||
| #include "BKE_layer.h" | #include "BKE_layer.h" | ||||
| #include "BKE_lib_id.h" | #include "BKE_lib_id.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| #include "BKE_sequencer.h" | #include "BKE_sequencer.h" | ||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "DEG_depsgraph_build.h" | #include "DEG_depsgraph_build.h" | ||||
| ▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | static void seq_prefetch_update_area(PrefetchJob *pfjob) | ||||
| /* reset */ | /* reset */ | ||||
| if (cfra < pfjob->cfra) { | if (cfra < pfjob->cfra) { | ||||
| pfjob->cfra = cfra; | pfjob->cfra = cfra; | ||||
| pfjob->num_frames_prefetched = 1; | pfjob->num_frames_prefetched = 1; | ||||
| } | } | ||||
| } | } | ||||
| void BKE_sequencer_prefetch_stop_all(void) | |||||
| { | |||||
| /*TODO(Richard): Use wm_jobs for prefetch, or pass main. */ | |||||
| for (Scene *scene = G.main->scenes.first; scene; scene = scene->id.next) { | |||||
| BKE_sequencer_prefetch_stop(scene); | |||||
| } | |||||
| } | |||||
| /* Use also to update scene and context changes | /* Use also to update scene and context changes | ||||
| * This function should almost always be called by cache invalidation, not directly. | * This function should almost always be called by cache invalidation, not directly. | ||||
| */ | */ | ||||
| void BKE_sequencer_prefetch_stop(Scene *scene) | void BKE_sequencer_prefetch_stop(Scene *scene) | ||||
| { | { | ||||
| PrefetchJob *pfjob; | PrefetchJob *pfjob; | ||||
| pfjob = seq_prefetch_job_get(scene); | pfjob = seq_prefetch_job_get(scene); | ||||
| ▲ Show 20 Lines • Show All 290 Lines • Show Last 20 Lines | |||||