Set correct image format for non-alpha windows.
Use QImage::Format_RGB32. Change-Id: I4be6b6271034be8dad5cfcb85f89fe33a817b78f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This commit is contained in:
parent
153d613353
commit
22bda3360e
@ -73,7 +73,9 @@ QPaintDevice *QCocoaBackingStore::paintDevice()
|
||||
}
|
||||
#endif
|
||||
|
||||
m_qImage = QImage(m_requestedSize * scaleFactor, QImage::Format_ARGB32_Premultiplied);
|
||||
QImage::Format format = window()->format().hasAlpha()
|
||||
? QImage::Format_ARGB32_Premultiplied : QImage::Format_RGB32;
|
||||
m_qImage = QImage(m_requestedSize * scaleFactor, format);
|
||||
m_qImage.setDevicePixelRatio(scaleFactor);
|
||||
}
|
||||
return &m_qImage;
|
||||
|
Loading…
Reference in New Issue
Block a user