Blender V4.3
image_cache.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2004 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
11#include "SEQ_render.hh" /* Needed for #eSeqTaskId. */
12
13struct ImBuf;
14struct Scene;
15struct SeqCache;
16struct SeqRenderData;
17struct Sequence;
18
21 void *userkey;
22 SeqCacheKey *link_prev; /* Used for linking intermediate items to final frame. */
23 SeqCacheKey *link_next; /* Used for linking intermediate items to final frame. */
26 float frame_index; /* Usually same as timeline_frame. Mapped to media for RAW entries. */
27 float timeline_frame; /* Only for reference - used for freeing when cache is full. */
28 float cost; /* In short: render time(s) divided by playback frame duration(s) */
29 bool is_temp_cache; /* this cache entry will be freed before rendering next frame */
30 /* ID of task for assigning temp cache entries to particular task(thread, etc.) */
32 int type;
33};
34
35ImBuf *seq_cache_get(const SeqRenderData *context, Sequence *seq, float timeline_frame, int type);
36void seq_cache_put(
37 const SeqRenderData *context, Sequence *seq, float timeline_frame, int type, ImBuf *i);
39 const SeqRenderData *context, Sequence *seq, float timeline_frame, int type, ImBuf *ibuf);
44bool seq_cache_recycle_item(Scene *scene);
45void seq_cache_free_temp_cache(Scene *scene, short id, int timeline_frame);
46void seq_cache_destruct(Scene *scene);
48 Sequence *seq,
49 Sequence *seq_changed,
50 int invalidate_types,
51 bool force_seq_changed_range);
53float seq_cache_frame_index_to_timeline_frame(Sequence *seq, float frame_index);
eSeqTaskId
Definition SEQ_render.hh:21
ImBuf * seq_cache_get(const SeqRenderData *context, Sequence *seq, float timeline_frame, int type)
bool seq_cache_put_if_possible(const SeqRenderData *context, Sequence *seq, float timeline_frame, int type, ImBuf *ibuf)
bool seq_cache_is_full()
void seq_cache_put(const SeqRenderData *context, Sequence *seq, float timeline_frame, int type, ImBuf *i)
void seq_cache_free_temp_cache(Scene *scene, short id, int timeline_frame)
void seq_cache_cleanup_sequence(Scene *scene, Sequence *seq, Sequence *seq_changed, int invalidate_types, bool force_seq_changed_range)
float seq_cache_frame_index_to_timeline_frame(Sequence *seq, float frame_index)
void seq_cache_destruct(Scene *scene)
bool seq_cache_recycle_item(Scene *scene)
float timeline_frame
SeqCacheKey * link_next
float frame_index
SeqCache * cache_owner
eSeqTaskId task_id
SeqCacheKey * link_prev
bool is_temp_cache
void * userkey
SeqRenderData context
Sequence * seq