aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp7
-rw-r--r--src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h1
2 files changed, 8 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
{
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h b/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h
index cf0d2d525e..d56fd01d3e 100644
--- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h
+++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h
@@ -117,6 +117,7 @@ public:
virtual QSGMaterialType *type() const;
virtual QSGMaterialShader *createShader() const;
+ virtual int compare(const QSGMaterial *other) const;
void setShift(const QPointF &shift) { m_shift = shift; }
const QPointF &shift() const { return m_shift; }