[core] Forward ImageManagerObserver::onRemoveUnusedStyleImages to MapObserver interface

This commit is contained in:
Alexander Shalamov
2019-05-06 11:31:23 +03:00
parent d24524440c
commit 100eb61fa4
6 changed files with 18 additions and 0 deletions

View File

@@ -179,4 +179,12 @@ void Map::Impl::onStyleImageMissing(const std::string& id, std::function<void()>
onUpdate();
}
void Map::Impl::onRemoveUnusedStyleImages(const std::vector<std::string>& unusedImageIDs) {
for (const auto& unusedImageID : unusedImageIDs) {
if (observer.onCanRemoveUnusedStyleImage(unusedImageID)) {
style->removeImage(unusedImageID);
}
}
}
} // namespace mbgl