From: Gunnar Sletta Date: Fri, 30 Sep 2011 13:46:17 +0000 (+0200) Subject: Include the textureid/glyph cache in the material sorting X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=b4725c0d2550322105e9004d75ee864659ccb1ab;p=konrad%2Fqtdeclarative.git 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 --- 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();