summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-06-20 07:08:32 (GMT)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-06-20 07:12:09 (GMT)
commit9a3f592966b9227f099e752f578a157500989146 (patch)
tree3027706ff02d216a78e497819a43f15ac2ae30fa
parentb133f1b45638dd10bd5400393d83ca1bed1985c4 (diff)
downloadQt-9a3f592966b9227f099e752f578a157500989146.zip
Qt-9a3f592966b9227f099e752f578a157500989146.tar.gz
Qt-9a3f592966b9227f099e752f578a157500989146.tar.bz2
Disable antialiasing for tiled image drawing.
Task-number: QTBUG-19821 Reviewed-by: Jani Hautakangas
-rw-r--r--src/openvg/qpaintengine_vg.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 0047aa3..e1e53f9 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -3110,7 +3110,7 @@ static void drawImageTiled(QVGPaintEnginePrivate *d,
VGImage tileWithOpacity = VG_INVALID_HANDLE;
if (d->opacity != 1) {
tileWithOpacity = pool->createPermanentImage(VG_sARGB_8888_PRE,
- tileWidth, tileHeight, VG_IMAGE_QUALITY_FASTER);
+ tileWidth, tileHeight, VG_IMAGE_QUALITY_NONANTIALIASED);
if (tileWithOpacity == VG_INVALID_HANDLE)
qWarning("drawImageTiled: Failed to create extra tile, ignoring opacity");
}
@@ -3123,6 +3123,10 @@ static void drawImageTiled(QVGPaintEnginePrivate *d,
VGfloat scaleY = r.height() / sourceRect.height();
d->setImageOptions();
+ VGImageQuality oldImageQuality = d->imageQuality;
+ VGRenderingQuality oldRenderingQuality = d->renderingQuality;
+ d->setImageQuality(VG_IMAGE_QUALITY_NONANTIALIASED);
+ d->setRenderingQuality(VG_RENDERING_QUALITY_NONANTIALIASED);
for (int y = sourceRect.y(); y < sourceRect.height(); y += tileHeight) {
int h = qMin(tileHeight, sourceRect.height() - y);
@@ -3162,6 +3166,9 @@ static void drawImageTiled(QVGPaintEnginePrivate *d,
vgDestroyImage(tile);
if (tileWithOpacity != VG_INVALID_HANDLE)
vgDestroyImage(tileWithOpacity);
+
+ d->setImageQuality(oldImageQuality);
+ d->setRenderingQuality(oldRenderingQuality);
}
// Used by qpixmapfilter_vg.cpp to draw filtered VGImage's.