summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-05-07 17:14:30 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-05-10 16:48:31 +0000
commitab216eaebf6d028367fddb93897bfb7ad694cc46 (patch)
tree5656f5cc301fd8dcb1e6d25924b06f761f088ed5 /src
parent78d8afed1ff1f8291dba4315768cf873c27789f2 (diff)
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 <eirik.aavitsland@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp3
1 files changed, 2 insertions, 1 deletions
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);