diff options
Diffstat (limited to 'src/mbgl/map/source.cpp')
-rw-r--r-- | src/mbgl/map/source.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/mbgl/map/source.cpp b/src/mbgl/map/source.cpp index b13a76c205..3036342d78 100644 --- a/src/mbgl/map/source.cpp +++ b/src/mbgl/map/source.cpp @@ -155,7 +155,7 @@ TileData::State Source::hasTile(const Tile::ID& id) { return TileData::State::invalid; } -TileData::State Source::addTile(Map &map, Environment &env, uv::worker &worker, +TileData::State Source::addTile(Map &map, uv::worker &worker, util::ptr<Style> style, GlyphAtlas &glyphAtlas, GlyphStore &glyphStore, SpriteAtlas &spriteAtlas, util::ptr<Sprite> sprite, TexturePool &texturePool, @@ -187,22 +187,18 @@ TileData::State Source::addTile(Map &map, Environment &env, uv::worker &worker, if (!new_tile.data) { // If we don't find working tile data, we're just going to load it. if (info.type == SourceType::Vector) { - new_tile.data = std::make_shared<VectorTileData>(normalized_id, map.getMaxZoom(), style, - glyphAtlas, glyphStore, - spriteAtlas, sprite, - info, env); + new_tile.data = + std::make_shared<VectorTileData>(normalized_id, map.getMaxZoom(), style, glyphAtlas, + glyphStore, spriteAtlas, sprite, info); new_tile.data->request(worker, map.getState().getPixelRatio(), callback); } else if (info.type == SourceType::Raster) { - new_tile.data = std::make_shared<RasterTileData>(normalized_id, texturePool, info, env); + new_tile.data = std::make_shared<RasterTileData>(normalized_id, texturePool, info); new_tile.data->request(worker, map.getState().getPixelRatio(), callback); } else if (info.type == SourceType::Annotations) { AnnotationManager& annotationManager = map.getAnnotationManager(); - new_tile.data = std::make_shared<LiveTileData>(normalized_id, - annotationManager, - map.getMaxZoom(), style, - glyphAtlas, glyphStore, - spriteAtlas, sprite, - info, env); + new_tile.data = std::make_shared<LiveTileData>(normalized_id, annotationManager, + map.getMaxZoom(), style, glyphAtlas, + glyphStore, spriteAtlas, sprite, info); new_tile.data->reparse(worker, callback); } else { throw std::runtime_error("source type not implemented"); @@ -293,7 +289,6 @@ bool Source::findLoadedParent(const Tile::ID& id, int32_t minCoveringZoom, std:: } void Source::update(Map &map, - Environment &env, uv::worker &worker, util::ptr<Style> style, GlyphAtlas &glyphAtlas, @@ -322,7 +317,7 @@ void Source::update(Map &map, // Add existing child/parent tiles if the actual tile is not yet loaded for (const Tile::ID& id : required) { - const TileData::State state = addTile(map, env, worker, style, glyphAtlas, glyphStore, + const TileData::State state = addTile(map, worker, style, glyphAtlas, glyphStore, spriteAtlas, sprite, texturePool, id, callback); if (state != TileData::State::parsed) { |