aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/scenegraph
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-09-30 15:46:17 +0200
committerQt by Nokia <qt-info@nokia.com>2011-09-30 16:50:17 +0200
commitb4725c0d2550322105e9004d75ee864659ccb1ab (patch)
treeda5535a083cd1db00ab9812c7ee266ac4d20b6c8 /src/declarative/scenegraph
parentd25745647aa4a1125c03eeba0efb8283cc0a5f91 (diff)
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 <qt_sanity_bot@ovi.com> Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
Diffstat (limited to 'src/declarative/scenegraph')
-rw-r--r--src/declarative/scenegraph/qsgdistancefieldglyphnode_p.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/scenegraph/qsgdistancefieldglyphnode_p.cpp b/src/declarative/scenegraph/qsgdistancefieldglyphnode_p.cpp
index 72c53a2ce7..1e8b668444 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<const QSGDistanceFieldTextMaterial *>(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();