Files
test/source/blender/sequencer/intern/cache/intra_frame_cache.hh
Aras Pranckevicius 9e4c26574a VSE: new cache implementation
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
2025-05-14 12:59:46 +02:00

41 lines
1.4 KiB
C++

/* SPDX-FileCopyrightText: 2025 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup sequencer
*
* Cached intermediate images used while rendering one sequencer frame.
* - For each strip, "preprocessed" (strip source, possibly
* transformed, with modifiers applied) and "composite" (result of
* blending this strip with image underneath) images are cached.
* - Whenever going to a different frame, the cached content of previous
* frame is cleared.
* - Primary reason for having this cache at all, is when the whole frame
* is a complex stack of things, and you want to tweak settings of one
* of the involved strips. You don't want to be re-calculating all the
* strips that are "below" your tweaked strip, for better interactivity.
*/
#pragma once
struct ImBuf;
struct Strip;
struct Scene;
namespace blender::seq {
ImBuf *intra_frame_cache_get_preprocessed(Scene *scene, const Strip *strip);
ImBuf *intra_frame_cache_get_composite(Scene *scene, const Strip *strip);
void intra_frame_cache_put_preprocessed(Scene *scene, const Strip *strip, ImBuf *image);
void intra_frame_cache_put_composite(Scene *scene, const Strip *strip, ImBuf *image);
void intra_frame_cache_destroy(Scene *scene);
void intra_frame_cache_invalidate(Scene *scene, const Strip *strip);
void intra_frame_cache_invalidate(Scene *scene);
void intra_frame_cache_set_cur_frame(Scene *scene, float frame, int view_id);
} // namespace blender::seq