[core] GeometryTileData needs to be updated in lockstep with FeatureIndex

This commit is contained in:
Chris Loer
2018-01-17 14:50:36 -08:00
committed by Chris Loer
parent 656a6373b9
commit fa57224791
2 changed files with 5 additions and 1 deletions

View File

@@ -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(

View File

@@ -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;