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
parent
2bc619c30e
commit
319e90dcdd
|
|
@ -145,9 +145,8 @@ void QWindowsBackingStore::resize(const QSize &size, const QRegion ®ion)
|
|||
<< " 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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue