Avoid Nearest mipmap filtering for BorderImage.
authorGunnar Sletta <gunnar.sletta@jollamobile.com>
Wed, 12 Feb 2014 14:37:48 +0000 (15:37 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Sun, 16 Feb 2014 11:28:20 +0000 (12:28 +0100)
QSGOpaqueTextureMaterial has Nearest as the default mipmap
filtering, which BorderImage inherited. That default value is
not ideal, but I would prefer to not change behavior, so
request None from borderimage instead.

Change-Id: I9857f1434ae9f067c3b0e460ea552d3e854b9d64
Reviewed-by: aavit <eirik.aavitsland@digia.com>
src/quick/items/qquickborderimage.cpp

index 8ecf473..b4a89b3 100644 (file)
@@ -619,6 +619,7 @@ QSGNode *QQuickBorderImage::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeDat
     node->setSubSourceRect(QRectF(0, 0, hTiles, vTiles));
     node->setMirror(d->mirror);
 
+    node->setMipmapFiltering(QSGTexture::None);
     node->setFiltering(d->smooth ? QSGTexture::Linear : QSGTexture::Nearest);
     if (innerSourceRect == QRectF(0, 0, 1, 1) && (vTiles > 1 || hTiles > 1)) {
         node->setHorizontalWrapMode(QSGTexture::Repeat);