45 if (scene ==
nullptr || scene->
ed ==
nullptr) {
54 if (cache !=
nullptr) {
66 if (strip ==
nullptr) {
70 if (cache !=
nullptr) {
79 for (
auto it = this->
map_.items().begin(); it != this->map_.items().end(); it++) {
80 const Strip *key = (*it).key;
83 this->
map_.remove(it);
90 ImBuf *image = this->
map_.lookup_default(strip,
nullptr);
91 if (image !=
nullptr) {
100 if (image ==
nullptr) {
103 ImBuf *existing = this->
map_.lookup_default(strip,
nullptr);
104 if (existing !=
nullptr) {
107 this->
map_.add_overwrite(strip, image);
113 for (
const auto &item : this->
map_.items()) {
122 if (strip ==
nullptr || cache ==
nullptr) {
131 if (strip ==
nullptr || cache ==
nullptr) {
139 if (scene ==
nullptr || scene->
ed ==
nullptr || strip ==
nullptr || image ==
nullptr) {
143 if (cache ==
nullptr) {
144 cache = MEM_new<IntraFrameCache>(__func__);
151 if (scene ==
nullptr || scene->
ed ==
nullptr || strip ==
nullptr || image ==
nullptr) {
155 if (cache ==
nullptr) {
156 cache = MEM_new<IntraFrameCache>(__func__);
164 if (cache !=
nullptr) {
172 if (cache !=
nullptr) {
178 cache->
width = width;
void IMB_freeImBuf(ImBuf *ibuf)
void IMB_refImBuf(ImBuf *ibuf)
SIMD_FORCE_INLINE void invalidate()
void intra_frame_cache_set_cur_frame(Scene *scene, float frame, int view_id, int width, int height)
void intra_frame_cache_invalidate(Scene *scene)
ImBuf * intra_frame_cache_get_composite(Scene *scene, const Strip *strip)
ImBuf * intra_frame_cache_get_preprocessed(Scene *scene, const Strip *strip)
void intra_frame_cache_destroy(Scene *scene)
void intra_frame_cache_put_composite(Scene *scene, const Strip *strip, ImBuf *image)
static IntraFrameCache * query_intra_frame_cache(Scene *scene)
void intra_frame_cache_put_preprocessed(Scene *scene, const Strip *strip, ImBuf *image)
IntraFrameCache * intra_frame_cache
StripImageMap preprocessed
void put(const Strip *strip, ImBuf *image)
void invalidate(const Strip *strip)
ImBuf * get(const Strip *strip) const
Map< const Strip *, ImBuf * > map_