From aa5c6b5e1f0d5588578bcff39554fd9f022e76b5 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Tue, 5 Jan 2021 23:10:04 +0200 Subject: [PATCH] correct condition for use of qt_x11_drawImage() in QRasterWindowSurface::flush() Signed-off-by: Ivailo Monev --- src/gui/painting/qwindowsurface_raster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp index 60366c436..bc4548c38 100644 --- a/src/gui/painting/qwindowsurface_raster.cpp +++ b/src/gui/painting/qwindowsurface_raster.cpp @@ -142,7 +142,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi int depth = widget->x11Info().depth(); const QImage *src = d->image; - if (src->format() != QImage::Format_RGB32 || (depth != 24 && depth != 32) || qt_x11Data->bppForDepth.value(depth) != 32) { + if (src->format() != QImage::Format_RGB32 || src->depth() != 32 || qt_x11Data->bppForDepth.value(depth) != 32) { Q_ASSERT(src->depth() >= 16); const QImage sub_src(src->scanLine(br.y()) + br.x() * (uint(src->depth()) / 8), br.width(), br.height(), src->bytesPerLine(), src->format()); -- 2.11.0