Skip to content

Conversation

@j-jorge
Copy link
Contributor

@j-jorge j-jorge commented Dec 1, 2025

This PR modifies TextureCache to use multiple threads to handle the work of AddImageAsync. The number of threads is set by std::thread::hardware_concurrency().

TextureCache now uses std::unique_ptr to make clear the ownership of data structures related to asynchronous texture loading. Redundant field _asyncRefCount has been removed. Uses of std::deque has been replaced by the more straightforward std::vector.

I've tested this in my app on my phone as well as, with ThreadSanitizer enabled, on my laptop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant