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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-21 13:34:54 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-21 13:35:57 +0300
commitad4dd3ebeffb34de1892d02bd372918f4866b7de (patch)
tree96d3385e052d8f6c3cf5c88e97e472857ff085ec /source/blender/windowmanager/intern/wm_operators.c
parentb03ee4828be1032052ee4f81f15691a56cde3415 (diff)
Fix T64421: crash using redraw timer benchmark
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operators.c')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 0bb2fd58824..4a99c2de6e7 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -3085,8 +3085,7 @@ static void redraw_timer_step(bContext *C,
{
if (type == eRTDrawRegion) {
if (ar) {
- ED_region_do_draw(C, ar);
- ar->do_draw = false;
+ wm_draw_region_test(C, sa, ar);
}
}
else if (type == eRTDrawRegionSwap) {
@@ -3110,8 +3109,7 @@ static void redraw_timer_step(bContext *C,
for (ar_iter = sa_iter->regionbase.first; ar_iter; ar_iter = ar_iter->next) {
if (ar_iter->visible) {
CTX_wm_region_set(C, ar_iter);
- ED_region_do_draw(C, ar_iter);
- ar_iter->do_draw = false;
+ wm_draw_region_test(C, sa_iter, ar_iter);
}
}
}
@@ -3156,6 +3154,7 @@ static int redraw_timer_exec(bContext *C, wmOperator *op)
wmWindow *win = CTX_wm_window(C);
ScrArea *sa = CTX_wm_area(C);
ARegion *ar = CTX_wm_region(C);
+ wmWindowManager *wm = CTX_wm_manager(C);
double time_start, time_delta;
const int type = RNA_enum_get(op->ptr, "type");
const int iter = RNA_int_get(op->ptr, "iterations");
@@ -3169,6 +3168,8 @@ static int redraw_timer_exec(bContext *C, wmOperator *op)
time_start = PIL_check_seconds_timer();
+ wm_window_make_drawable(wm, win);
+
for (a = 0; a < iter; a++) {
redraw_timer_step(C, bmain, scene, depsgraph, win, sa, ar, type, cfra);
iter_steps += 1;