Build font contours concurrently #237
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using a MIT licensed thread pool written by Barak Shoshany (BS::thread_pool)
Reading TrueType font files and creating atlas' for use with VulkanSceneGraph is a slow, single threaded process especially when the application allows the user to individually select any TrueType font on their system during execution of the product. Reading and converting TrueType fonts to the more efficient .vsgb form cannot be predicted up-font or batched on startup. This change moves the expensive generation of glyph contours to packaged tasks which are submitted to a solid MIT licensed thread pool (included in the vsgXchange source, src/thread-pool). I tried to minimize the code change as much as possible so that reviewing and accepting the code change is easier.
You can find the original code for the thread pool here. I have not made any changes to the single header packaged up with vsgXchange: BS::thread_pool