diff --git a/cmake/core-files.cmake b/cmake/core-files.cmake index 61bc79c33..e49e32fc5 100644 --- a/cmake/core-files.cmake +++ b/cmake/core-files.cmake @@ -226,6 +226,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 ed1518fb7..ed36e217b 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 62be4f50c..b2a609895 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -354,7 +354,7 @@ void Map::setStyleURL(const std::string& url) { impl->styleJSON.clear(); impl->styleMutated = false; - impl->style = std::make_unique