From 10069a0f7ab4a5698eadc9e9628198e800c945bf Mon Sep 17 00:00:00 2001
From: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Date: Mon, 12 May 2014 10:38:58 +0200
Subject: [PATCH] Support smooth for AnimatedSprite

Task-number: QTBUG-38923
Change-Id: I1cb9ac434aa729ee390e17deced9ed470895549d
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
---
 src/quick/items/qquickanimatedsprite.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/quick/items/qquickanimatedsprite.cpp b/src/quick/items/qquickanimatedsprite.cpp
index bfe957e943..533f1cabed 100644
--- a/src/quick/items/qquickanimatedsprite.cpp
+++ b/src/quick/items/qquickanimatedsprite.cpp
@@ -498,7 +498,6 @@ QSGGeometryNode* QQuickAnimatedSprite::buildNode()
         return 0;
     m_sheetSize = QSizeF(image.size());
     m_material->texture = window()->createTextureFromImage(image);
-    m_material->texture->setFiltering(QSGTexture::Linear);
     m_spriteEngine->start(0);
     m_material->animT = 0;
     m_material->animX1 = m_spriteEngine->spriteX() / m_sheetSize.width();
@@ -677,6 +676,7 @@ void QQuickAnimatedSprite::prepareNextFrame()
     m_material->animW = w;
     m_material->animH = h;
     m_material->animT = m_interpolate ? progress : 0.0;
+    m_material->texture->setFiltering(smooth() ? QSGTexture::Linear : QSGTexture::Nearest);
 }
 
 QT_END_NAMESPACE
-- 
GitLab