From f6624b84cf75aecad2899e3e43fc28fd9d2ea0d8 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sun, 19 Jan 2014 00:16:19 +0600 Subject: Send sequencer render context as const pointer rather than as value No functional changes just creepy to send rather huge structure by value. --- source/blender/blenkernel/intern/seqcache.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/blender/blenkernel/intern/seqcache.c') diff --git a/source/blender/blenkernel/intern/seqcache.c b/source/blender/blenkernel/intern/seqcache.c index 38d3d46ee6b..a85e70d2afc 100644 --- a/source/blender/blenkernel/intern/seqcache.c +++ b/source/blender/blenkernel/intern/seqcache.c @@ -209,13 +209,13 @@ void BKE_sequencer_cache_cleanup_sequence(Sequence *seq) IMB_moviecache_cleanup(moviecache, seqcache_key_check_seq, seq); } -struct ImBuf *BKE_sequencer_cache_get(SeqRenderData context, Sequence *seq, float cfra, seq_stripelem_ibuf_t type) +struct ImBuf *BKE_sequencer_cache_get(const SeqRenderData *context, Sequence *seq, float cfra, seq_stripelem_ibuf_t type) { if (moviecache && seq) { SeqCacheKey key; key.seq = seq; - key.context = context; + key.context = *context; key.cfra = cfra - seq->start; key.type = type; @@ -225,11 +225,11 @@ struct ImBuf *BKE_sequencer_cache_get(SeqRenderData context, Sequence *seq, floa return NULL; } -void BKE_sequencer_cache_put(SeqRenderData context, Sequence *seq, float cfra, seq_stripelem_ibuf_t type, ImBuf *i) +void BKE_sequencer_cache_put(const SeqRenderData *context, Sequence *seq, float cfra, seq_stripelem_ibuf_t type, ImBuf *i) { SeqCacheKey key; - if (i == NULL || context.skip_cache) { + if (i == NULL || context->skip_cache) { return; } @@ -238,7 +238,7 @@ void BKE_sequencer_cache_put(SeqRenderData context, Sequence *seq, float cfra, s } key.seq = seq; - key.context = context; + key.context = *context; key.cfra = cfra - seq->start; key.type = type; @@ -271,7 +271,7 @@ static void preprocessed_cache_destruct(void) preprocess_cache = NULL; } -ImBuf *BKE_sequencer_preprocessed_cache_get(SeqRenderData context, Sequence *seq, float cfra, seq_stripelem_ibuf_t type) +ImBuf *BKE_sequencer_preprocessed_cache_get(const SeqRenderData *context, Sequence *seq, float cfra, seq_stripelem_ibuf_t type) { SeqPreprocessCacheElem *elem; @@ -288,7 +288,7 @@ ImBuf *BKE_sequencer_preprocessed_cache_get(SeqRenderData context, Sequence *seq if (elem->type != type) continue; - if (seq_cmp_render_data(&elem->context, &context) != 0) + if (seq_cmp_render_data(&elem->context, context) != 0) continue; IMB_refImBuf(elem->ibuf); @@ -298,7 +298,7 @@ ImBuf *BKE_sequencer_preprocessed_cache_get(SeqRenderData context, Sequence *seq return NULL; } -void BKE_sequencer_preprocessed_cache_put(SeqRenderData context, Sequence *seq, float cfra, seq_stripelem_ibuf_t type, ImBuf *ibuf) +void BKE_sequencer_preprocessed_cache_put(const SeqRenderData *context, Sequence *seq, float cfra, seq_stripelem_ibuf_t type, ImBuf *ibuf) { SeqPreprocessCacheElem *elem; @@ -314,7 +314,7 @@ void BKE_sequencer_preprocessed_cache_put(SeqRenderData context, Sequence *seq, elem->seq = seq; elem->type = type; - elem->context = context; + elem->context = *context; elem->ibuf = ibuf; preprocess_cache->cfra = cfra; -- cgit v1.2.3