11a99fb2b1e9ce69fbf5fb33c50331fa038745c8
Prefetching happens on a background thread by design, and so it was not loading any fonts and using the default monospace font. Address this by making all font usage within VSE use "unique" BLF font objects, and protecting concurrent access to them or their state within VSE itself: - SeqFontMap structure to hold a mutex, file path -> font ID map (for file based fonts), name -> font ID map (for datablock fonts). - seq_load_font_file, seq_load_font_mem, seq_unload_font that use the above instead of calling into BLF directly. - Text effect rendering part guards with a mutex, so that font render state and glyph cache does not get trashed. - SeqFontMap is global instead of some Scene-specific runtime data (e.g. scene->ed), because right now there's a hard max limit of total number of fonts (64), and if each copy of the VSE data would start to load their own unique fonts, that limit could get easily reached. - BLF font loading/unloading code is now thread safe. The rest of BLF drawing is still not! If at some point in the future BLF font usage becomes thread safe, and font drawing becomes "stateless", this whole machinery can be removed. Pull Request: https://projects.blender.org/blender/blender/pulls/130542
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
