Windows: Use Format_ARGB32_Premultiplied for backing store with alpha.

Following the logic in Qt 4's QRasterWindowSurface::setGeometry().

Task-number: QTBUG-30302
Change-Id: Ica571cfd5098e3d9faedefaff0880acfb2209958
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
bb10
Friedemann Kleint 2014-05-06 09:12:40 +02:00 committed by The Qt Project
parent 2bc619c30e
commit 319e90dcdd
1 changed files with 2 additions and 3 deletions

View File

@ -145,9 +145,8 @@ void QWindowsBackingStore::resize(const QSize &size, const QRegion &region)
<< " from: " << (m_image.isNull() ? QSize() : m_image->image().size());
}
#endif
QImage::Format format = QWindowsNativeImage::systemFormat();
if (format == QImage::Format_RGB32 && window()->format().hasAlpha())
format = QImage::Format_ARGB32_Premultiplied;
const QImage::Format format = window()->format().hasAlpha() ?
QImage::Format_ARGB32_Premultiplied : QWindowsNativeImage::systemFormat();
QWindowsNativeImage *oldwni = m_image.data();
QWindowsNativeImage *newwni = new QWindowsNativeImage(size.width(), size.height(), format);