From b4725c0d2550322105e9004d75ee864659ccb1ab Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 30 Sep 2011 15:46:17 +0200 Subject: [PATCH] Include the textureid/glyph cache in the material sorting Change-Id: Ic9740081e9e0e53801bbda64f6b147ab74102663 Reviewed-on: http://codereview.qt-project.org/5887 Reviewed-by: Qt Sanity Bot Reviewed-by: Yoann Lopes --- .../scenegraph/qsgdistancefieldglyphnode_p.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/declarative/scenegraph/qsgdistancefieldglyphnode_p.cpp b/src/declarative/scenegraph/qsgdistancefieldglyphnode_p.cpp index 72c53a2..1e8b668 100644 --- a/src/declarative/scenegraph/qsgdistancefieldglyphnode_p.cpp +++ b/src/declarative/scenegraph/qsgdistancefieldglyphnode_p.cpp @@ -225,6 +225,8 @@ int QSGDistanceFieldTextMaterial::compare(const QSGMaterial *o) const { Q_ASSERT(o && type() == o->type()); const QSGDistanceFieldTextMaterial *other = static_cast(o); + if (m_glyph_cache != other->m_glyph_cache) + return m_glyph_cache - other->m_glyph_cache; if (m_glyph_cache->fontScale() != other->m_glyph_cache->fontScale()) { qreal s1 = m_glyph_cache->fontScale(); qreal s2 = other->m_glyph_cache->fontScale(); -- 1.7.2.5