loading images on their own thread

This commit is contained in:
fourtf
2018-08-09 18:39:46 +02:00
parent bb76a632f4
commit 6344fa6b23
5 changed files with 96 additions and 30 deletions
+5 -2
View File
@@ -4,6 +4,7 @@
#include <QPixmap>
#include <QString>
#include <QThread>
#include <atomic>
#include <boost/noncopyable.hpp>
#include <boost/variant.hpp>
@@ -19,6 +20,10 @@ struct Frame {
Pixmap pixmap;
int duration;
};
struct ParseFrame {
QImage image;
int duration;
};
class Frames
{
public:
@@ -77,7 +82,5 @@ private:
bool shouldLoad_{false};
Frames frames_{};
QObject object_{};
static std::atomic<bool> loadedEventQueued;
};
} // namespace chatterino