diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-02-01 18:24:25 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-02-01 18:34:30 +0300 |
commit | 7884ae6eb274bea0fe4739255a41a693df833b11 (patch) | |
tree | 38cd12c4d1a25ab38ca255b7e0263b77fc5fb067 /source/blender/editors/interface | |
parent | 1a840c3e27a4a5b00412f786db14182e1d3a2255 (diff) |
Fix T53686: VSE Render crash when zooming timeline
This is rather a workaround to avoid main thread freeing all glyph caches
at the same time as sequencer uses fonts to draw text sequences.
Ideally we need to either make cache more local, or user-counted or to make
somewhat more global locks. All this ends up in a bigger refactor which is
better for 2.8. For the meantime let's make Blender more stable with a tiny
workaround.
Downside is that keeping zooming things up and down in interface during render
will increase memory usage by unused glyph caches. It's not too bad though,
all unused caches will be freed first time at area zoom after render.
Thanks Bastien for review!
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/view2d.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 38432395a17..f2f4154160d 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -1027,6 +1027,13 @@ bool UI_view2d_tab_set(View2D *v2d, int tab) void UI_view2d_zoom_cache_reset(void) { + /* TODO(sergey): This way we avoid threading conflict with VSE rendering + * text strip. But ideally we want to make glyph cache to be fully safe + * for threading. + */ + if (G.is_rendering) { + return; + } /* While scaling we can accumulate fonts at many sizes (~20 or so). * Not an issue with embedded font, but can use over 500Mb with i18n ones! See [#38244]. */ |