QRasterBackingStore: check format alpha presence in a more generic way
...instead of hardcoding a format such as ARGB32_Pre. A subclass may override format() after all. A few lines below there is the same check in fact, but this time with hasAlphaChannel(). To be consistent, switch over to hasAlphaChannel() in the first case as well. Pick-to: 6.5 Change-Id: I7a5653863a72f8a0df98da66290f6d17e548b0a8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 522d9fcfe40a107779f6e21d83195fafa67fb064) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
6f22ed4b55
commit
b808b7004c
@ -67,7 +67,7 @@ void QRasterBackingStore::beginPaint(const QRegion ®ion)
|
||||
if (m_image.devicePixelRatio() != nativeWindowDevicePixelRatio || m_image.size() != effectiveBufferSize) {
|
||||
m_image = QImage(effectiveBufferSize, format());
|
||||
m_image.setDevicePixelRatio(nativeWindowDevicePixelRatio);
|
||||
if (m_image.format() == QImage::Format_ARGB32_Premultiplied)
|
||||
if (m_image.hasAlphaChannel())
|
||||
m_image.fill(Qt::transparent);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user