aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-11-11 08:30:43 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-11 09:48:08 +0100
commit98c47db70a72a8afbd86afd355dadb1ce9113361 (patch)
tree1c4181669788024fc228bd88f6531b1ce4b346f6 /src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp
parentb31d47e5b87f92178ced4adc15984d9960e9e01c (diff)
Implement missing compare() function for Raised/Sunken text
Task-number: QTBUG-34715 Change-Id: Ifdac2511b7f642b1ea4bd06847c840b5a951a753 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp')
-rw-r--r--src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp
index ac936b6663..12a431246c 100644
--- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp
+++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp
@@ -471,6 +471,13 @@ QSGMaterialShader *QSGDistanceFieldShiftedStyleTextMaterial::createShader() cons
return new DistanceFieldShiftedStyleTextMaterialShader;
}
+int QSGDistanceFieldShiftedStyleTextMaterial::compare(const QSGMaterial *o) const
+{
+ const QSGDistanceFieldShiftedStyleTextMaterial *other = static_cast<const QSGDistanceFieldShiftedStyleTextMaterial *>(o);
+ if (m_shift != other->m_shift)
+ return &m_shift < &other->m_shift ? -1 : 1;
+ return QSGDistanceFieldStyledTextMaterial::compare(o);
+}
class QSGHiQSubPixelDistanceFieldTextMaterialShader : public QSGDistanceFieldTextMaterialShader
{