summaryrefslogtreecommitdiff
path: root/src/mbgl/layout/symbol_instance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/layout/symbol_instance.cpp')
-rw-r--r--src/mbgl/layout/symbol_instance.cpp10
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());