From d482805856a83f39fdab32c76f10cf7d7d5e2112 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 4 Feb 2016 10:15:59 +0100 Subject: Do not change depth for the backingstore's underlying image The depth cannot change. This means that RGB16 cannot be upgraded to 8565 for example as that would be a 24 bit format whereas the backingstores and the underlying platform may expect a 16 bit format. Task-number: QTBUG-50869 Change-Id: I648b39287d43a80fae8097a33bbf3b8bbdcb8816 Reviewed-by: Friedemann Kleint Reviewed-by: Andreas Holzammer Reviewed-by: Allan Sandfeld Jensen --- src/plugins/platforms/windows/qwindowsbackingstore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/windows/qwindowsbackingstore.cpp') diff --git a/src/plugins/platforms/windows/qwindowsbackingstore.cpp b/src/plugins/platforms/windows/qwindowsbackingstore.cpp index a6b1d0af26..af9d2a5969 100644 --- a/src/plugins/platforms/windows/qwindowsbackingstore.cpp +++ b/src/plugins/platforms/windows/qwindowsbackingstore.cpp @@ -155,7 +155,7 @@ void QWindowsBackingStore::resize(const QSize &size, const QRegion ®ion) if (QImage::toPixelFormat(format).alphaUsage() == QPixelFormat::UsesAlpha) m_alphaNeedsFill = true; else // upgrade but here we know app painting does not rely on alpha hence no need to fill - format = qt_alphaVersionForPainting(format); + format = qt_maybeAlphaVersionWithSameDepth(format); QWindowsNativeImage *oldwni = m_image.data(); QWindowsNativeImage *newwni = new QWindowsNativeImage(size.width(), size.height(), format); -- cgit v1.2.3