diff --git a/Telegram/SourceFiles/base/bytes.h b/Telegram/SourceFiles/base/bytes.h index 9b062f1ce..3810e1b4a 100644 --- a/Telegram/SourceFiles/base/bytes.h +++ b/Telegram/SourceFiles/base/bytes.h @@ -10,6 +10,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "base/basic_types.h" #include #include +#include +#include namespace bytes { diff --git a/Telegram/SourceFiles/base/flat_map.h b/Telegram/SourceFiles/base/flat_map.h index 18a9ede3d..9c8a9bcd7 100644 --- a/Telegram/SourceFiles/base/flat_map.h +++ b/Telegram/SourceFiles/base/flat_map.h @@ -481,7 +481,7 @@ public: return compare()(key, where->first) ? impl().end() : where; } - template + template iterator findFirst(const OtherKey &key) { if (empty() || compare()(key, front().first) @@ -492,7 +492,7 @@ public: return compare()(key, where->first) ? impl().end() : where; } - template + template const_iterator findFirst(const OtherKey &key) const { if (empty() || compare()(key, front().first) @@ -810,13 +810,13 @@ public: const_iterator find(const Key &key) const { return this->findFirst(key); } - template + template iterator find(const OtherKey &key) { - return this->findFirst(key); + return this->template findFirst(key); } - template + template const_iterator find(const OtherKey &key) const { - return this->findFirst(key); + return this->template findFirst(key); } Type &operator[](const Key &key) { diff --git a/Telegram/SourceFiles/chat_helpers/stickers.cpp b/Telegram/SourceFiles/chat_helpers/stickers.cpp index e8dc619a1..859658bf2 100644 --- a/Telegram/SourceFiles/chat_helpers/stickers.cpp +++ b/Telegram/SourceFiles/chat_helpers/stickers.cpp @@ -1101,7 +1101,7 @@ auto LottieFromDocument( QSize box) { const auto data = document->data(); const auto filepath = document->filepath(); - if (box.width() & box.height() > kDontCacheLottieAfterArea) { + if (box.width() * box.height() > kDontCacheLottieAfterArea) { // Don't use frame caching for large stickers. return method( Lottie::ReadContent(data, filepath), diff --git a/Telegram/SourceFiles/lottie/lottie_cache.cpp b/Telegram/SourceFiles/lottie/lottie_cache.cpp index 0167d01f9..2b1892d2f 100644 --- a/Telegram/SourceFiles/lottie/lottie_cache.cpp +++ b/Telegram/SourceFiles/lottie/lottie_cache.cpp @@ -483,6 +483,7 @@ bool Cache::readHeader(const FrameRequest &request) { || request.size(original) != size) { return false; } + _encoder = static_cast(encoder); _size = size; _original = original; _frameRate = frameRate; @@ -608,7 +609,7 @@ void Cache::writeHeader() { QDataStream stream(&_data, QIODevice::WriteOnly); stream - << static_cast(Encoder::YUV420A4_LZ4) + << static_cast(_encoder) << _size << _original << qint32(_frameRate) diff --git a/Telegram/SourceFiles/lottie/lottie_cache.h b/Telegram/SourceFiles/lottie/lottie_cache.h index 983a99fa5..c3a8eebeb 100644 --- a/Telegram/SourceFiles/lottie/lottie_cache.h +++ b/Telegram/SourceFiles/lottie/lottie_cache.h @@ -121,7 +121,6 @@ private: int _offsetFrameIndex = 0; Encoder _encoder = Encoder::YUV420A4_LZ4; FnMut _put; - bool _changed = false; }; diff --git a/Telegram/SourceFiles/lottie/lottie_multi_player.cpp b/Telegram/SourceFiles/lottie/lottie_multi_player.cpp index badb8c789..03fae88f2 100644 --- a/Telegram/SourceFiles/lottie/lottie_multi_player.cpp +++ b/Telegram/SourceFiles/lottie/lottie_multi_player.cpp @@ -172,7 +172,7 @@ void MultiPlayer::checkNextFrameRender() { void MultiPlayer::updateFrameRequest( not_null animation, const FrameRequest &request) { - const auto i = _active.find(animation.get()); + const auto i = _active.find(animation); Assert(i != _active.end()); _renderer->updateFrameRequest(i->second, request); diff --git a/Telegram/ThirdParty/crl b/Telegram/ThirdParty/crl index 1f0d4470b..9ea870038 160000 --- a/Telegram/ThirdParty/crl +++ b/Telegram/ThirdParty/crl @@ -1 +1 @@ -Subproject commit 1f0d4470b1234e31c75a4186abd59759d8142414 +Subproject commit 9ea870038a2a667add7f621be6252db909068386