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:
@@ -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 ¤t(int32 framew, int32 frameh);
|
||||
|
||||
ClipState state() const;
|
||||
|
||||
~ClipReader();
|
||||
|
||||
private:
|
||||
|
||||
ClipState _state;
|
||||
|
||||
FileLocation *_location;
|
||||
QByteArray _data;
|
||||
int32 _width, _height;
|
||||
bool _rounded;
|
||||
|
||||
QPixmap _current;
|
||||
bool _currentDisplayed;
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user