aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-12-17 23:06:35 +0100
committerdec05eba <dec05eba@protonmail.com>2022-12-17 23:06:35 +0100
commit88cd57714af6bfc307d41f9dfa74da45600d51e0 (patch)
tree708451908928a4da1771320f36f30218f5eff63c /include
parent35e754008bb449c52cb54ccbf2ed9a21e97009c5 (diff)
Only unload the exact thumbnail that is not visible on the screen
Diffstat (limited to 'include')
-rw-r--r--include/AsyncImageLoader.hpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/AsyncImageLoader.hpp b/include/AsyncImageLoader.hpp
index 42e7915..2d083b5 100644
--- a/include/AsyncImageLoader.hpp
+++ b/include/AsyncImageLoader.hpp
@@ -25,9 +25,8 @@ namespace QuickMedia {
LoadingState loading_state = LoadingState::NOT_LOADED;
mgl::Texture texture;
std::unique_ptr<mgl::Image> image; // Set in another thread. This should be .reset after loading it into |texture|, to save memory
- size_t counter = 0;
+ uint32_t counter = 0;
Path thumbnail_path;
- std::string url;
};
struct ThumbnailLoadData {
@@ -91,6 +90,6 @@ namespace QuickMedia {
AsyncTask<void> load_threads[NUM_IMAGE_LOAD_PARALLEL];
MessageQueue<ThumbnailLoadData> image_thumbnail_create_queue;
std::unordered_map<std::string, std::shared_ptr<ThumbnailData>> thumbnails;
- size_t counter = 0;
+ uint32_t counter = 0;
};
}