plugins/startupfeedback: use inplace QImage::convertTo
to reuse internal buffers
This commit is contained in:
parent
a7b6093ca0
commit
4716f91b9a
1 changed files with 1 additions and 1 deletions
|
@ -389,7 +389,7 @@ QImage StartupFeedbackEffect::scalePixmap(const QPixmap &pm, const QSize &size)
|
|||
const QSize &adjustedSize = size * m_bounceSizesRatio;
|
||||
QImage scaled = pm.toImage().scaled(adjustedSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||
if (scaled.format() != QImage::Format_ARGB32_Premultiplied && scaled.format() != QImage::Format_ARGB32) {
|
||||
scaled = scaled.convertToFormat(QImage::Format_ARGB32);
|
||||
scaled.convertTo(QImage::Format_ARGB32);
|
||||
}
|
||||
|
||||
QImage result(20 * m_bounceSizesRatio, 20 * m_bounceSizesRatio, QImage::Format_ARGB32);
|
||||
|
|
Loading…
Reference in a new issue