2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

gif redesign done, started ClipReader - gif animation reader in separate thread

This commit is contained in:
John Preston
2015-12-13 20:05:32 +03:00
parent 6100c1dcca
commit a66c051eb5
8 changed files with 351 additions and 78 deletions

View File

@@ -470,3 +470,34 @@ private:
Animation _a_frames;
};
enum ClipState {
ClipPlaying,
ClipStopped,
};
class ClipReader {
public:
ClipReader(const FileLocation &location, const QByteArray &data);
void start(int32 framew, int32 frameh, bool rounded);
const QPixmap &current(int32 framew, int32 frameh);
ClipState state() const;
~ClipReader();
private:
ClipState _state;
FileLocation *_location;
QByteArray _data;
int32 _width, _height;
bool _rounded;
QPixmap _current;
bool _currentDisplayed;
};