diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-01-09 13:05:13 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-01-10 10:15:22 -0800 |
commit | e7778509c546f4d1e0dd73e2d1deceb146c90de2 (patch) | |
tree | d8101c341d45a6a011cb37101f486814be7a6259 /src/mbgl/layout/symbol_layout.cpp | |
parent | ea4c0b77c39926c770b0003097509e36dc26621d (diff) | |
download | qtlocation-mapboxgl-e7778509c546f4d1e0dd73e2d1deceb146c90de2.tar.gz |
[core] Fix flickering caused by regression in #7586
It should be safe to invoke GeometryTileWorker::setData multiple times without invoking GeometryTileWorker::setLayers. Therefore GeometryTileWorker::redoLayout() must not consume the layers.
Diffstat (limited to 'src/mbgl/layout/symbol_layout.cpp')
-rw-r--r-- | src/mbgl/layout/symbol_layout.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/layout/symbol_layout.cpp b/src/mbgl/layout/symbol_layout.cpp index 85e0b19609..eaa0332995 100644 --- a/src/mbgl/layout/symbol_layout.cpp +++ b/src/mbgl/layout/symbol_layout.cpp @@ -27,7 +27,7 @@ namespace mbgl { using namespace style; -SymbolLayout::SymbolLayout(std::vector<std::unique_ptr<Layer>> layers_, +SymbolLayout::SymbolLayout(std::vector<std::string> layerIDs_, std::string sourceLayerName_, uint32_t overscaling_, float zoom_, @@ -37,7 +37,7 @@ SymbolLayout::SymbolLayout(std::vector<std::unique_ptr<Layer>> layers_, style::SymbolLayoutProperties::Evaluated layout_, float textMaxSize_, SpriteAtlas& spriteAtlas_) - : layers(std::move(layers_)), + : layerIDs(std::move(layerIDs_)), sourceLayerName(std::move(sourceLayerName_)), overscaling(overscaling_), zoom(zoom_), @@ -254,7 +254,7 @@ void SymbolLayout::addFeature(const SymbolFeature& feature, ? SymbolPlacementType::Point : layout.get<SymbolPlacement>(); const float textRepeatDistance = symbolSpacing / 2; - IndexedSubfeature indexedFeature = {feature.index, sourceLayerName, layers.at(0)->getID(), symbolInstances.size()}; + IndexedSubfeature indexedFeature = {feature.index, sourceLayerName, layerIDs.at(0), symbolInstances.size()}; auto addSymbolInstance = [&] (const GeometryCoordinates& line, Anchor& anchor) { // https://github.com/mapbox/vector-tile-spec/tree/master/2.1#41-layers |