diff options
author | Ansis Brammanis <ansis@mapbox.com> | 2017-10-26 11:31:33 -0400 |
---|---|---|
committer | Chris Loer <chris.loer@gmail.com> | 2017-10-31 10:25:57 -0700 |
commit | 27fb8750b2a1f34548db4df4dc528de59204d726 (patch) | |
tree | 54b95c7afe41e3f5be67cabb928c9d15aab19585 | |
parent | edfd79ea34cd61f7124c61d1a0dec2c5533bc61b (diff) | |
download | qtlocation-mapboxgl-27fb8750b2a1f34548db4df4dc528de59204d726.tar.gz |
remove placedText and placedIcon from SymbolInstance
Opacities are stored in a separate map in Placement and linked to the
symbol instance by an id. Hopefully this will make it easier to apply
semi-stale placements to newly-loaded tiles later on.
[skip ci]
-rw-r--r-- | src/mbgl/layout/symbol_instance.cpp | 4 | ||||
-rw-r--r-- | src/mbgl/layout/symbol_instance.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/text/placement.cpp | 2 |
3 files changed, 1 insertions, 7 deletions
diff --git a/src/mbgl/layout/symbol_instance.cpp b/src/mbgl/layout/symbol_instance.cpp index 1e67a96421..3bc13331f8 100644 --- a/src/mbgl/layout/symbol_instance.cpp +++ b/src/mbgl/layout/symbol_instance.cpp @@ -37,9 +37,7 @@ SymbolInstance::SymbolInstance(Anchor& anchor_, featureIndex(featureIndex_), textOffset(textOffset_), iconOffset(iconOffset_), - key(key_), - placedText(false), - placedIcon(false) { + key(key_) { // Create the quads used for rendering the icon and glyphs. if (addToBuffers) { diff --git a/src/mbgl/layout/symbol_instance.hpp b/src/mbgl/layout/symbol_instance.hpp index b9217c44ae..f40f38368a 100644 --- a/src/mbgl/layout/symbol_instance.hpp +++ b/src/mbgl/layout/symbol_instance.hpp @@ -49,8 +49,6 @@ public: std::array<float, 2> iconOffset; std::u16string key; bool isDuplicate; - bool placedText; - bool placedIcon; std::vector<size_t> placedTextIndices; // TODO clean this up std::vector<size_t> placedIconIndices; uint32_t crossTileID = 0; diff --git a/src/mbgl/text/placement.cpp b/src/mbgl/text/placement.cpp index 0d428513c0..c4633a2205 100644 --- a/src/mbgl/text/placement.cpp +++ b/src/mbgl/text/placement.cpp @@ -132,12 +132,10 @@ void Placement::placeLayerBucket( placeIcon = placeText && placeIcon; } - symbolInstance.placedText = placeText; if (placeText) { collisionIndex.insertFeature(symbolInstance.textCollisionFeature, bucket.layout.get<TextIgnorePlacement>()); } - symbolInstance.placedIcon = placeIcon; if (placeIcon) { collisionIndex.insertFeature(symbolInstance.iconCollisionFeature, bucket.layout.get<IconIgnorePlacement>()); } |