summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-01-17 14:50:36 -0800
committerChris Loer <chris.loer@mapbox.com>2018-01-18 14:36:22 -0800
commitfa5722479100875778d07427d817cd3c64d7aeca (patch)
tree44e67d11bd7604bb5fa1ac987253fe96fceb1365 /src
parent656a6373b91ad0c757fdeb8fb1ffb80e9f53d649 (diff)
downloadqtlocation-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.cpp5
-rw-r--r--src/mbgl/tile/geometry_tile.hpp1
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;