Commit: f96490446f4b7ae2e4684e607342c3295a9e5d3e Author: Aditya Y Jeppu Date: Fri Jul 30 19:28:43 2021 +0530 Branches: soc-2021-vse-strip-thumbnails https://developer.blender.org/rBf96490446f4b7ae2e4684e607342c3295a9e5d3e
Revert "Remove static variable usage. Increase extra images cached" This reverts commit 72550b8dc7b46d0d0ed7d3651eba8ae8f4c0c710. =================================================================== M source/blender/editors/space_sequencer/sequencer_draw.c M source/blender/editors/space_sequencer/space_sequencer.c M source/blender/makesdna/DNA_space_types.h M source/blender/sequencer/intern/render.c =================================================================== diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 092fdd8ad92..9665d424da7 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1253,10 +1253,12 @@ static void sequencer_thumbnail_get_job(const bContext *C, WM_jobs_callbacks(wm_job, thumbnail_startjob, NULL, NULL, thumbnail_endjob); } else { - /* Free the hash input */ BLI_ghash_free(seqs, NULL, thumbnail_hash_data_free); + // Workaround for now } + // TODO(AYJ) : add the new data to the existing thread if new information has come in (calls this + // function twice) if (!WM_jobs_is_running(wm_job)) { G.is_break = false; WM_jobs_start(CTX_wm_manager(C), wm_job); @@ -1273,11 +1275,11 @@ static void thumbnail_call_for_job(const bContext *C, Editing *ed, View2D *v2d, SpaceSeq *sseq = CTX_wm_space_seq(C); /* Set the data for thumbnail caching job */ + static rctf check_view = {0, 0, 0, 0}; GHash *thumb_data_hash; // leftover is set to true if missing image in strip. false when normal call to all strips done - if (v2d->cur.xmax != sseq->check_view_area.xmax || v2d->cur.ymax != sseq->check_view_area.ymax || - leftover) { + if (!BLI_rctf_compare(&check_view, &v2d->cur, 0.1) || leftover) { thumb_data_hash = BLI_ghash_ptr_new("seq_duplicates_and_origs"); LISTBASE_FOREACH (Sequence *, seq, ed->seqbasep) { @@ -1292,7 +1294,7 @@ static void thumbnail_call_for_job(const bContext *C, Editing *ed, View2D *v2d, context.view_id = BKE_scene_multiview_view_id_get(&scene->r, STEREO_LEFT_NAME); context.use_proxies = false; sequencer_thumbnail_get_job(C, v2d, context, thumb_data_hash); - sseq->check_view_area = v2d->cur; + check_view = v2d->cur; } } @@ -2314,6 +2316,8 @@ static void draw_seq_backdrop(View2D *v2d) static void draw_seq_strips(const bContext *C, Editing *ed, ARegion *region) { + struct Main *bmain = CTX_data_main(C); + struct Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); Scene *scene = CTX_data_scene(C); View2D *v2d = ®ion->v2d; SpaceSeq *sseq = CTX_wm_space_seq(C); diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index 6eda75e4bb3..cf26d1e3243 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -101,8 +101,7 @@ static SpaceLink *sequencer_create(const ScrArea *UNUSED(area), const Scene *sce sseq->flag = SEQ_SHOW_GPENCIL | SEQ_USE_ALPHA | SEQ_SHOW_MARKERS | SEQ_SHOW_FCURVES | SEQ_ZOOM_TO_FIT | SEQ_SHOW_STRIP_OVERLAY | SEQ_SHOW_STRIP_NAME | SEQ_SHOW_STRIP_SOURCE | SEQ_SHOW_STRIP_DURATION; - struct rctf temp = {0, 0, 0, 0}; - sseq->check_view_area = temp; + /* Tool header. */ region = MEM_callocN(sizeof(ARegion), "tool header for sequencer"); diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 8d030e80ba1..04c9eab33f1 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -616,10 +616,6 @@ typedef struct SpaceSeq { /** Multiview current eye - for internal use. */ char multiview_eye; char _pad2[7]; - - /** Required for Thumbnail caching job call condition */ - struct rctf check_view_area; - } SpaceSeq; /* SpaceSeq.mainb */ diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index 6fe04456f2d..b6e17da51b3 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -2109,8 +2109,8 @@ void SEQ_render_thumbnails(SeqRenderData *context, SeqRenderState state; seq_render_state_init(&state); - start_frame = start_frame - 5 * frame_step; - float upper_limit = view_area->xmax + 5 * frame_step; + start_frame = start_frame - 3 * frame_step; + float upper_limit = view_area->xmax + 3 * frame_step; while (start_frame < upper_limit) { ibuf = seq_cache_get(context, seq_orig, roundf(start_frame), SEQ_CACHE_STORE_THUMBNAIL); if (ibuf) { _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs