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

Support rendering Webm videos with alpha.

This commit is contained in:
John Preston
2022-01-19 17:45:51 +03:00
parent 1755ead681
commit 8b7d2c880e
25 changed files with 139 additions and 44 deletions

View File

@@ -994,7 +994,7 @@ std::vector<not_null<DocumentData*>> Stickers::getListByEmoji(
const auto CreateSortKey = [&](
not_null<DocumentData*> document,
int base) {
if (document->sticker() && document->sticker()->animated) {
if (document->sticker() && document->sticker()->isAnimated()) {
base += kSlice;
}
return TimeId(base + int((document->id ^ seed) % kSlice));
@@ -1005,7 +1005,7 @@ std::vector<not_null<DocumentData*>> Stickers::getListByEmoji(
auto myCounter = 0;
const auto CreateMySortKey = [&](not_null<DocumentData*> document) {
auto base = kSlice * 6;
if (!document->sticker() || !document->sticker()->animated) {
if (!document->sticker() || !document->sticker()->isAnimated()) {
base -= kSlice;
}
return (base - (++myCounter));
@@ -1019,7 +1019,7 @@ std::vector<not_null<DocumentData*>> Stickers::getListByEmoji(
const auto InstallDateAdjusted = [&](
TimeId date,
not_null<DocumentData*> document) {
return (document->sticker() && document->sticker()->animated)
return (document->sticker() && document->sticker()->isAnimated())
? date
: date / 2;
};