diff --git a/cmake/core-files.cmake b/cmake/core-files.cmake index 0ea01992d..e8c168df4 100644 --- a/cmake/core-files.cmake +++ b/cmake/core-files.cmake @@ -221,6 +221,8 @@ set(MBGL_CORE_FILES src/mbgl/sprite/sprite_atlas.cpp src/mbgl/sprite/sprite_atlas.hpp src/mbgl/sprite/sprite_atlas_observer.hpp + src/mbgl/sprite/sprite_atlas_worker.cpp + src/mbgl/sprite/sprite_atlas_worker.hpp src/mbgl/sprite/sprite_image.cpp src/mbgl/sprite/sprite_parser.cpp src/mbgl/sprite/sprite_parser.hpp diff --git a/src/mbgl/annotation/annotation_manager.cpp b/src/mbgl/annotation/annotation_manager.cpp index 537ac7015..f2b2b1837 100644 --- a/src/mbgl/annotation/annotation_manager.cpp +++ b/src/mbgl/annotation/annotation_manager.cpp @@ -21,19 +21,9 @@ const std::string AnnotationManager::PointLayerID = "com.mapbox.annotations.poin AnnotationManager::AnnotationManager(float pixelRatio) : spriteAtlas({ 1024, 1024 }, pixelRatio) { - - struct NullFileSource : public FileSource { - std::unique_ptr request(const Resource&, Callback) override { - assert(false); - return nullptr; - } - }; - - NullFileSource nullFileSource; - - // This is a special atlas, holding only images added via addIcon. But we need its isLoaded() - // method to return true. - spriteAtlas.load("", nullFileSource); + // This is a special atlas, holding only images added via addIcon, so we always treat it as + // loaded. + spriteAtlas.markAsLoaded(); } AnnotationManager::~AnnotationManager() = default; diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index c2844f87f..40be7c374 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -359,7 +359,7 @@ void Map::setStyleURL(const std::string& url) { impl->styleJSON.clear(); impl->styleMutated = false; - impl->style = std::make_unique