Skip to content

Commit

Permalink
drop symbols and buckets when checks fail
Browse files Browse the repository at this point in the history
  • Loading branch information
TimSylvester committed Jun 24, 2024
1 parent 8fb459a commit a601efe
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions src/mbgl/layout/symbol_layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -878,9 +878,12 @@ void SymbolLayout::createBucket(const ImagePositions&,
canonical,
lastAddedSection);
}
symbolInstance.check(__SOURCE_LOCATION__);
assert(lastAddedSection); // True, as hasText == true;
updatePaintPropertiesForSection(*bucket, feature, *lastAddedSection, canonical);
if (symbolInstance.check(__SOURCE_LOCATION__)) {
assert(lastAddedSection); // True, as hasText == true;
updatePaintPropertiesForSection(*bucket, feature, *lastAddedSection, canonical);
} else {
break;
}
}

symbolInstance.releaseSharedData();
Expand All @@ -889,14 +892,16 @@ void SymbolLayout::createBucket(const ImagePositions&,
if (showCollisionBoxes) {
addToDebugBuffers(*bucket);
}
if (bucket->hasData()){
for (const auto& pair : layerPaintProperties) {
if (!firstLoad) {
bucket->justReloaded = true;
if (bucket->hasData()) {
if (bucket->check(__SOURCE_LOCATION__)) {
for (const auto &pair: layerPaintProperties) {
if (!firstLoad) {
bucket->justReloaded = true;
}
renderData.emplace(pair.first, LayerRenderData{bucket, pair.second});
}
renderData.emplace(pair.first, LayerRenderData{bucket, pair.second});
bucket->check(__SOURCE_LOCATION__);
}
bucket->check(__SOURCE_LOCATION__);
}
}

Expand Down

0 comments on commit a601efe

Please sign in to comment.