diff options
author | Chris Loer <chris.loer@gmail.com> | 2018-01-17 14:50:36 -0800 |
---|---|---|
committer | Chris Loer <chris.loer@mapbox.com> | 2018-01-18 14:36:22 -0800 |
commit | fa5722479100875778d07427d817cd3c64d7aeca (patch) | |
tree | 44e67d11bd7604bb5fa1ac987253fe96fceb1365 /src | |
parent | 656a6373b91ad0c757fdeb8fb1ffb80e9f53d649 (diff) | |
download | qtlocation-mapboxgl-fa5722479100875778d07427d817cd3c64d7aeca.tar.gz |
[core] GeometryTileData needs to be updated in lockstep with FeatureIndex
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/tile/geometry_tile.cpp | 5 | ||||
-rw-r--r-- | src/mbgl/tile/geometry_tile.hpp | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/mbgl/tile/geometry_tile.cpp b/src/mbgl/tile/geometry_tile.cpp index 4965158a9f..a58c744065 100644 --- a/src/mbgl/tile/geometry_tile.cpp +++ b/src/mbgl/tile/geometry_tile.cpp @@ -131,7 +131,7 @@ void GeometryTile::onLayout(LayoutResult result, const uint64_t resultCorrelatio (void)resultCorrelationID; nonSymbolBuckets = std::move(result.nonSymbolBuckets); pendingFeatureIndex = std::move(result.featureIndex); - data = std::move(result.tileData); + pendingData = std::move(result.tileData); observer->onTileChanged(*this); } @@ -217,6 +217,9 @@ void GeometryTile::commitFeatureIndex() { if (pendingFeatureIndex) { featureIndex = std::move(pendingFeatureIndex); } + if (pendingData) { + data = std::move(pendingData); + } } void GeometryTile::queryRenderedFeatures( diff --git a/src/mbgl/tile/geometry_tile.hpp b/src/mbgl/tile/geometry_tile.hpp index 1851ad7494..00a4aafadf 100644 --- a/src/mbgl/tile/geometry_tile.hpp +++ b/src/mbgl/tile/geometry_tile.hpp @@ -127,6 +127,7 @@ private: std::unique_ptr<FeatureIndex> featureIndex; std::unique_ptr<FeatureIndex> pendingFeatureIndex; std::unique_ptr<const GeometryTileData> data; + std::unique_ptr<const GeometryTileData> pendingData; optional<AlphaImage> glyphAtlasImage; optional<PremultipliedImage> iconAtlasImage; |