From 5ef3265cd46de6579399562429e26961d6f13885 Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Sun, 22 Jan 2017 20:22:14 +0100 Subject: Add anisotropic filtering support to QSGTexture This patch adds support to switch on anisotropic filtering on QSGTexture and to QSGDefaultImageNode. Not adding this support to QSGImageNode since it became public in 5.8, and it does not allow additional virtual methods anymore. Change-Id: Ibf1744845df2297f9129b1b5ce6a69d0a3b31c7c Reviewed-by: Andy Nichols Reviewed-by: Gunnar Sletta --- src/quick/scenegraph/util/qsgdefaultimagenode.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/quick/scenegraph/util/qsgdefaultimagenode.cpp') diff --git a/src/quick/scenegraph/util/qsgdefaultimagenode.cpp b/src/quick/scenegraph/util/qsgdefaultimagenode.cpp index 63773887a0..7186ee4265 100644 --- a/src/quick/scenegraph/util/qsgdefaultimagenode.cpp +++ b/src/quick/scenegraph/util/qsgdefaultimagenode.cpp @@ -94,6 +94,21 @@ QSGTexture::Filtering QSGDefaultImageNode::mipmapFiltering() const return m_material.mipmapFiltering(); } +void QSGDefaultImageNode::setAnisotropyLevel(QSGTexture::AnisotropyLevel level) +{ + if (m_material.anisotropyLevel() == level) + return; + + m_material.setAnisotropyLevel(level); + m_opaque_material.setAnisotropyLevel(level); + markDirty(DirtyMaterial); +} + +QSGTexture::AnisotropyLevel QSGDefaultImageNode::anisotropyLevel() const +{ + return m_material.anisotropyLevel(); +} + void QSGDefaultImageNode::setRect(const QRectF &r) { if (m_rect == r) -- cgit v1.2.3