add prefetch (default off)

This commit is contained in:
ouwou
2020-12-18 01:13:31 -05:00
parent 776c350eb6
commit 3916a50bf9
7 changed files with 50 additions and 2 deletions

View File

@@ -41,6 +41,10 @@ void ImageManager::LoadFromURL(std::string url, callback_type cb) {
});
}
void ImageManager::Prefetch(std::string url) {
m_cache.GetFileFromURL(url, [](const auto &) {});
}
void ImageManager::RunCallbacks() {
m_cb_mutex.lock();
m_cb_queue.front()();