Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/seqcache.c
| Show First 20 Lines • Show All 1,219 Lines • ▼ Show 20 Lines | struct ImBuf *BKE_sequencer_cache_get( | ||||
| Scene *scene = context->scene; | Scene *scene = context->scene; | ||||
| if (context->is_prefetch_render) { | if (context->is_prefetch_render) { | ||||
| context = BKE_sequencer_prefetch_get_original_context(context); | context = BKE_sequencer_prefetch_get_original_context(context); | ||||
| scene = context->scene; | scene = context->scene; | ||||
| seq = BKE_sequencer_prefetch_get_original_sequence(seq, scene); | seq = BKE_sequencer_prefetch_get_original_sequence(seq, scene); | ||||
| } | } | ||||
| if (!seq) { | |||||
| return NULL; | |||||
| } | |||||
| if (!scene->ed->cache) { | if (!scene->ed->cache) { | ||||
| seq_cache_create(context->bmain, scene); | seq_cache_create(context->bmain, scene); | ||||
| } | } | ||||
| seq_cache_lock(scene); | seq_cache_lock(scene); | ||||
| SeqCache *cache = seq_cache_get_from_scene(scene); | SeqCache *cache = seq_cache_get_from_scene(scene); | ||||
| ImBuf *ibuf = NULL; | ImBuf *ibuf = NULL; | ||||
| SeqCacheKey key; | SeqCacheKey key; | ||||
| ▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | bool BKE_sequencer_cache_put_if_possible(const SeqRenderData *context, | ||||
| Scene *scene = context->scene; | Scene *scene = context->scene; | ||||
| if (context->is_prefetch_render) { | if (context->is_prefetch_render) { | ||||
| context = BKE_sequencer_prefetch_get_original_context(context); | context = BKE_sequencer_prefetch_get_original_context(context); | ||||
| scene = context->scene; | scene = context->scene; | ||||
| seq = BKE_sequencer_prefetch_get_original_sequence(seq, scene); | seq = BKE_sequencer_prefetch_get_original_sequence(seq, scene); | ||||
| } | } | ||||
| if (!seq) { | |||||
| return NULL; | |||||
vvv: Returning NULL instead of false here gives me a warning "C4047: 'return': 'bool' differs in… | |||||
| } | |||||
| if (BKE_sequencer_cache_recycle_item(scene)) { | if (BKE_sequencer_cache_recycle_item(scene)) { | ||||
| BKE_sequencer_cache_put(context, seq, cfra, type, ibuf, cost, skip_disk_cache); | BKE_sequencer_cache_put(context, seq, cfra, type, ibuf, cost, skip_disk_cache); | ||||
| return true; | return true; | ||||
| } | } | ||||
| else { | else { | ||||
| seq_cache_set_temp_cache_linked(scene, scene->ed->cache->last_key); | seq_cache_set_temp_cache_linked(scene, scene->ed->cache->last_key); | ||||
| scene->ed->cache->last_key = NULL; | scene->ed->cache->last_key = NULL; | ||||
| return false; | return false; | ||||
| ▲ Show 20 Lines • Show All 147 Lines • Show Last 20 Lines | |||||
Returning NULL instead of false here gives me a warning "C4047: 'return': 'bool' differs in levels of indirection from 'void *'" with VS2017 compiler.