2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Use objects instead of pointers for corners.

Also don't change mask corner images when color theme is changed.
This prevents race condition in mask corner images access, because
the GIF frame readers access mask corner images from other threads.
This commit is contained in:
John Preston
2017-07-13 17:42:46 +03:00
parent 9fd8b040b7
commit 2f816942b8
11 changed files with 65 additions and 74 deletions

View File

@@ -265,7 +265,7 @@ void TabbedPanel::startShowAnimation() {
auto inner = rect().marginsRemoved(st::emojiPanMargins);
_showAnimation->setFinalImage(std::move(image), QRect(inner.topLeft() * cIntRetinaFactor(), inner.size() * cIntRetinaFactor()));
auto corners = App::cornersMask(ImageRoundRadius::Small);
_showAnimation->setCornerMasks(QImage(*corners[0]), QImage(*corners[1]), QImage(*corners[2]), QImage(*corners[3]));
_showAnimation->setCornerMasks(corners[0], corners[1], corners[2], corners[3]);
_showAnimation->start();
}
hideChildren();