2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Don't blend SoftLight patterns in realtime.

This commit is contained in:
John Preston
2021-08-13 20:19:06 +03:00
parent 2b46f87d7b
commit b9a9520ef5
7 changed files with 92 additions and 59 deletions

View File

@@ -58,7 +58,7 @@ class FiltersMenu;
struct CachedBackground {
QPixmap pixmap;
QRect area;
QSize area;
int x = 0;
int y = 0;
};
@@ -400,7 +400,7 @@ public:
void toggleFiltersMenu(bool enabled);
[[nodiscard]] rpl::producer<> filtersMenuChanged() const;
[[nodiscard]] CachedBackground cachedBackground(QRect area);
[[nodiscard]] CachedBackground cachedBackground(QSize area);
rpl::lifetime &lifetime() {
return _lifetime;
@@ -462,7 +462,7 @@ private:
rpl::event_stream<> _filtersMenuChanged;
CachedBackground _cachedBackground;
QRect _willCacheForArea;
QSize _willCacheForArea;
crl::time _lastAreaChangeTime = 0;
base::Timer _cacheBackgroundTimer;