Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Antalik <richardantalik@gmail.com>2019-09-14 03:21:54 +0300
committerRichard Antalik <richardantalik@gmail.com>2019-09-14 03:24:42 +0300
commitab3a9dc1ed28d44bd71f5e255da74ef4d6f1fdbf (patch)
tree957e85faac06300afcb8bb76087c0683f0a45496 /source/blender/editors/space_sequencer
parent0547a7753643f45861306542857d97215ecb2c4f (diff)
VSE: prefetching
When enabled prefetching(preview panel>view settings), a pernament running job is created, that will render frames in the background until the cache is full. If the cache is not filled fast enough, prefetch job suspends itself at the last moment and will wait until it has chance to "catch up". Effectively this will decouple rendering to separate thread, so rendering itself is a bit faster. Cache recycling behavior will be changed to "free furthest frame to the left of playhead if possible, otherwise rightmost frame". Reviewed By: brecht Differential Revision: https://developer.blender.org/D5386
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index b15acb12d00..bf555e8fe09 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -72,6 +72,7 @@
#include "UI_view2d.h"
#include "WM_api.h"
+#include "WM_types.h"
#include "MEM_guardedalloc.h"
@@ -1223,6 +1224,14 @@ void sequencer_draw_maskedit(const bContext *C, Scene *scene, ARegion *ar, Space
}
#endif
+/* Force redraw, when prefetching and using cache view. */
+static void seq_prefetch_wm_notify(const bContext *C, Scene *scene)
+{
+ if (BKE_sequencer_prefetch_need_redraw(CTX_data_main(C), scene)) {
+ WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, NULL);
+ }
+}
+
static void *sequencer_OCIO_transform_ibuf(
const bContext *C, ImBuf *ibuf, bool *glsl_used, int *format, int *type)
{
@@ -1612,6 +1621,7 @@ void sequencer_draw_preview(const bContext *C,
}
UI_view2d_view_restore(C);
+ seq_prefetch_wm_notify(C, scene);
}
#if 0
@@ -2004,6 +2014,8 @@ void draw_timeline_seq(const bContext *C, ARegion *ar)
short cfra_flag = 0;
float col[3];
+ seq_prefetch_wm_notify(C, scene);
+
/* clear and setup matrix */
UI_GetThemeColor3fv(TH_BACK, col);
if (ed && ed->metastack.first) {