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-25 10:31:38 +0200
commit858a28140e4076d003055783d3e845ffb338b501 (patch)
tree4e6047b293df3ef3201bb16dcd915d610164ebef /src
parent37f7f11f1ae2c6dc83b22fbd423708e5479f0303 (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. Change-Id: I3a0ce120ab96a6f95d11c165d1f5b356dae009fe Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit ab216eaebf6d028367fddb93897bfb7ad694cc46)
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 0bfcb175c9..902f8d911c 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -2426,7 +2426,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);