mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Seek done in video player in MediaView. Some memory leaks fixed.
Using pixmapFromImageInPlace() instead of QPixmap::fromImage().
This commit is contained in:
@@ -1019,13 +1019,13 @@ void MainWidget::onCacheBackground() {
|
||||
}
|
||||
_cachedX = 0;
|
||||
_cachedY = 0;
|
||||
_cachedBackground = QPixmap::fromImage(result);
|
||||
_cachedBackground = App::pixmapFromImageInPlace(std_::move(result));
|
||||
} else {
|
||||
QRect to, from;
|
||||
backgroundParams(_willCacheFor, to, from);
|
||||
_cachedX = to.x();
|
||||
_cachedY = to.y();
|
||||
_cachedBackground = QPixmap::fromImage(bg.toImage().copy(from).scaled(to.width() * cIntRetinaFactor(), to.height() * cIntRetinaFactor(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
_cachedBackground = App::pixmapFromImageInPlace(bg.toImage().copy(from).scaled(to.width() * cIntRetinaFactor(), to.height() * cIntRetinaFactor(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
_cachedBackground.setDevicePixelRatio(cRetinaFactor());
|
||||
}
|
||||
_cachedFor = _willCacheFor;
|
||||
|
Reference in New Issue
Block a user