diff options
author | Robin Burchell <robin.burchell@jollamobile.com> | 2013-11-04 14:18:15 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-04 15:01:30 +0100 |
commit | aeb1d48c9938241b1ffcf8e42e3864595e90b168 (patch) | |
tree | 6e6301ea33c8f0c0801eeabbc89e3ec3cb97c700 /src/quick/scenegraph/qsgdistancefieldglyphnode.cpp | |
parent | 751ec14a5c5332d7ce8a057da853cc809fe2991a (diff) |
Handle glyph runs with >65536 glyphs
Done-with: Aaron Kennedy <aaron.kennedy@jollamobile.com>
Change-Id: Ica3a1dccc798186414b92f900b858966ac8dc8c9
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgdistancefieldglyphnode.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgdistancefieldglyphnode.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp b/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp index 49b56494db..a9faf12096 100644 --- a/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp +++ b/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp @@ -235,7 +235,12 @@ void QSGDistanceFieldGlyphNode::updateGeometry() if (texture->textureId && !m_texture) m_texture = texture; - if (m_texture != texture) { + // As we use UNSIGNED_SHORT indexing in the geometry, we overload the + // "glyphsInOtherTextures" concept as overflow for if there are more than + // 65536 vertices to render which would otherwise exceed the maximum index + // size. This will cause sub-nodes to be recursively created to handle any + // number of glyphs. + if (m_texture != texture || vp.size() >= 65536) { if (texture->textureId) { GlyphInfo &glyphInfo = glyphsInOtherTextures[texture]; glyphInfo.indexes.append(glyphIndex); |