Rework internals of how VSE caching is done. Primarily to make all the caching logic more understandable from development point of view, but also has several user visible implications (more details in the PR): - Simpler and fewer caching UI options, - Disk cache is gone (primary reason: proxies are kinda the same thing), - VSE cache size set in preferences is actual size used for VSE caches now (previously caching stopped as soon as whole Blender used that much memory, even if some memory usage was not about VSE at all), - Certain scenarios of cache invalidation are faster now. Pull Request: https://projects.blender.org/blender/blender/pulls/137926
41 lines
1.2 KiB
C++
41 lines
1.2 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 playhead, biasing towards removal of
|
|
* frames behind the playhead.
|
|
* - 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, float timeline_frame, int view_id, ImBuf *image);
|
|
|
|
ImBuf *final_image_cache_get(Scene *scene, float timeline_frame, int view_id);
|
|
|
|
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
|