Regression caused by9e4c26574a. Add strip stack as a key to the final cache. Use the pointer to the list of sequences, as it is the easiest one to obtain in all places where it is needed. This is slightly different from the code prior to the9e4c26574awhere strips.last() was used, but it allows to use the same logic in the prefetch job. Pull Request: https://projects.blender.org/blender/blender/pulls/141778
50 lines
1.5 KiB
C++
50 lines
1.5 KiB
C++
/* SPDX-FileCopyrightText: 2025 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup sequencer
|
|
*
|
|
* Cache of final rendered frames.
|
|
* - Keyed by (timeline frame, view_id).
|
|
* - When full, cache eviction policy is to remove frames furthest
|
|
* from the current-frame, biasing towards removal of
|
|
* frames behind the current-frame.
|
|
* - Invalidated fairly often while editing, basically whenever any
|
|
* strip overlapping that frame changes.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
struct ImBuf;
|
|
struct Strip;
|
|
struct Scene;
|
|
|
|
namespace blender::seq {
|
|
|
|
void final_image_cache_put(Scene *scene,
|
|
const ListBase *seqbasep,
|
|
float timeline_frame,
|
|
int view_id,
|
|
int display_channel,
|
|
ImBuf *image);
|
|
|
|
ImBuf *final_image_cache_get(Scene *scene,
|
|
const ListBase *seqbasep,
|
|
float timeline_frame,
|
|
int view_id,
|
|
int display_channel);
|
|
|
|
void final_image_cache_invalidate_frame_range(Scene *scene,
|
|
const float timeline_frame_start,
|
|
const float timeline_frame_end);
|
|
|
|
void final_image_cache_clear(Scene *scene);
|
|
void final_image_cache_destroy(Scene *scene);
|
|
|
|
bool final_image_cache_evict(Scene *scene);
|
|
|
|
size_t final_image_cache_get_image_count(const Scene *scene);
|
|
|
|
} // namespace blender::seq
|