From a07cb53c2311de255fe6cd677ae487c385a71942 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 4 Apr 2024 10:08:55 +0200 Subject: Fix a regression when painting CMYK over ARGB32_Premultiplied With the introduction of CMYK32 the old logic of assuming depth meant compatible alpha version no longer works. So change the logic to more explicitly return compatible opaque or alpha versions and remove the now invalid qt_maybeAlphaVersionWithSameDepth. Change-Id: Ib1f7b76b0ce0eae7d49a0dfe369918a746bbe2b4 Reviewed-by: Giuseppe D'Angelo --- src/plugins/platforms/xcb/qxcbbackingstore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/xcb') diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp index 0659cf9fc4..8353fac6a9 100644 --- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp +++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp @@ -173,7 +173,7 @@ void QXcbBackingStoreImage::init(const QSize &size, uint depth, QImage::Format f m_qimage_format = format; m_hasAlpha = QImage::toPixelFormat(m_qimage_format).alphaUsage() == QPixelFormat::UsesAlpha; if (!m_hasAlpha) - m_qimage_format = qt_maybeAlphaVersionWithSameDepth(m_qimage_format); + m_qimage_format = qt_maybeDataCompatibleAlphaVersion(m_qimage_format); memset(&m_shm_info, 0, sizeof m_shm_info); -- cgit v1.2.3