diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-02-24 13:56:05 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-02-28 13:59:14 -0800 |
commit | e18f60229e8a8a00d6aaa617ac635a0f084465ba (patch) | |
tree | 041d25a270d06d354a36a162c74b407be3ebdcee /src/mbgl/layout/symbol_instance.cpp | |
parent | 02d56488e40f1ae5d3408b3e9fe62166a27f4599 (diff) | |
download | qtlocation-mapboxgl-e18f60229e8a8a00d6aaa617ac635a0f084465ba.tar.gz |
[core] There's only ever one icon quad
Diffstat (limited to 'src/mbgl/layout/symbol_instance.cpp')
-rw-r--r-- | src/mbgl/layout/symbol_instance.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mbgl/layout/symbol_instance.cpp b/src/mbgl/layout/symbol_instance.cpp index 2935fddd91..4f425641e7 100644 --- a/src/mbgl/layout/symbol_instance.cpp +++ b/src/mbgl/layout/symbol_instance.cpp @@ -16,17 +16,15 @@ SymbolInstance::SymbolInstance(Anchor& anchor, const GeometryCoordinates& line, hasText(shapedTextOrientations.first || shapedTextOrientations.second), hasIcon(shapedIcon), - // Create the quad used for rendering the icon. - iconQuads(addToBuffers && shapedIcon ? - getIconQuads(anchor, shapedIcon, line, layout, iconPlacement, shapedTextOrientations.first) : - SymbolQuads()), - // Create the collision features that will be used to check whether this symbol instance can be placed textCollisionFeature(line, anchor, shapedTextOrientations.second ?: shapedTextOrientations.first, textBoxScale, textPadding, textPlacement, indexedFeature), iconCollisionFeature(line, anchor, shapedIcon, iconBoxScale, iconPadding, iconPlacement, indexedFeature) { - // Create the quads used for rendering the glyphs. + // Create the quads used for rendering the icon and glyphs. if (addToBuffers) { + if (shapedIcon) { + iconQuad = getIconQuad(anchor, shapedIcon, line, layout, iconPlacement, shapedTextOrientations.first); + } if (shapedTextOrientations.first) { auto quads = getGlyphQuads(anchor, shapedTextOrientations.first, textBoxScale, line, layout, textPlacement, face); glyphQuads.insert(glyphQuads.end(), quads.begin(), quads.end()); |