From ab216eaebf6d028367fddb93897bfb7ad694cc46 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 7 May 2021 17:14:30 +0200 Subject: Fix antialiasing of rotated non-smooth scaled images The fast-path can't antialias edges, and shouldn't be used when that is requested. Pick-to: 6.1 5.15 Change-Id: I3a0ce120ab96a6f95d11c165d1f5b356dae009fe Reviewed-by: Eirik Aavitsland --- src/gui/painting/qpaintengine_raster.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 8ea7e28748..3ce5b08326 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -2369,7 +2369,8 @@ void QRasterPaintEngine::drawImage(const QRectF &r, const QImage &img, const QRe if (s->matrix.type() > QTransform::TxScale) { SrcOverTransformFunc func = qTransformFunctions[d->rasterBuffer->format][img.format()]; // The fast transform methods doesn't really work on small targets, see QTBUG-93475 - if (func && (!clip || clip->hasRectClip) && targetBounds.width() >= 16 && targetBounds.height() >= 16) { + // And it can't antialias the edges + if (func && (!clip || clip->hasRectClip) && !s->flags.antialiased && targetBounds.width() >= 16 && targetBounds.height() >= 16) { func(d->rasterBuffer->buffer(), d->rasterBuffer->bytesPerLine(), img.bits(), img.bytesPerLine(), r, sr, !clip ? d->deviceRect : clip->clipRect, s->matrix, s->intOpacity); -- cgit v1.2.3