61 if (scene ==
nullptr || scene->
ed ==
nullptr) {
69 if (scene ==
nullptr || scene->
ed ==
nullptr) {
73 if (cache ==
nullptr) {
74 cache = MEM_new<PreviewCache>(__func__);
80 Scene *scene,
int timeline_frame,
int view_id,
int display_channel,
int width,
int height)
83 if (cache ==
nullptr) {
100 Scene *scene,
int timeline_frame,
int view_id,
int display_channel,
int width,
int height)
103 if (cache ==
nullptr) {
145 if (score >= best_score) {
158 if (cache ==
nullptr ||
texture ==
nullptr) {
164 cache, timeline_frame, view_id, display_channel, width, height);
165 if (slot ==
nullptr) {
185 if (cache ==
nullptr ||
texture ==
nullptr) {
191 cache, timeline_frame, view_id, display_channel, width, height);
192 if (slot ==
nullptr) {
209 if (cache !=
nullptr) {
217 if (cache !=
nullptr) {
#define GPU_TEXTURE_FREE_SAFE(texture)
TEX_TEMPLATE DataVec texture(T, FltCoord, float=0.0f) RET
gpu::Texture * preview_cache_get_gpu_texture(Scene *scene, int timeline_frame, int view_id, int display_channel, int width, int height)
void preview_cache_set_gpu_texture(Scene *scene, int timeline_frame, int view_id, int display_channel, gpu::Texture *texture)
void preview_cache_set_gpu_scope_texture(Scene *scene, int timeline_frame, int view_id, int display_channel, gpu::Texture *texture)
void preview_cache_destroy(Scene *scene)
static PreviewCacheItem * find_slot(PreviewCache *cache, int timeline_frame, int view_id, int display_channel, int width, int height)
gpu::Texture * preview_cache_get_gpu_scope_texture(Scene *scene, int timeline_frame, int view_id, int display_channel, int width, int height)
static PreviewCache * ensure_preview_cache(Scene *scene)
static PreviewCache * query_preview_cache(Scene *scene)
void preview_cache_invalidate(Scene *scene)
int GPU_texture_width(const gpu::Texture *texture)
int GPU_texture_height(const gpu::Texture *texture)
seq::EditingRuntime * runtime
PreviewCache * preview_cache
gpu::Texture * scope_texture
PreviewCacheItem items[cache_size]
static constexpr int cache_size