diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2019-03-19 16:57:36 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2019-03-20 13:47:20 +0200 |
commit | a4e96e0fe64ffa06978f3d05c571736a811d707f (patch) | |
tree | 1cb7d4d7bbbdd6250a9ff3e320dd93af06c3ba03 /src/mbgl/map/map_impl.cpp | |
parent | d40a90a4141c797531ed4a86990bd3e6ab339d2e (diff) | |
download | qtlocation-mapboxgl-a4e96e0fe64ffa06978f3d05c571736a811d707f.tar.gz |
[core] Remove file source from public Map ctorupstream/map-ctor-no-filesource
Diffstat (limited to 'src/mbgl/map/map_impl.cpp')
-rw-r--r-- | src/mbgl/map/map_impl.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mbgl/map/map_impl.cpp b/src/mbgl/map/map_impl.cpp index fbceff559f..348e26700f 100644 --- a/src/mbgl/map/map_impl.cpp +++ b/src/mbgl/map/map_impl.cpp @@ -1,6 +1,7 @@ #include <mbgl/layermanager/layer_manager.hpp> #include <mbgl/map/map_impl.hpp> #include <mbgl/renderer/update_parameters.hpp> +#include <mbgl/storage/file_source.hpp> #include <mbgl/style/style_impl.hpp> #include <mbgl/util/exception.hpp> @@ -8,20 +9,20 @@ namespace mbgl { Map::Impl::Impl(RendererFrontend& frontend_, MapObserver& observer_, - FileSource& fileSource_, Scheduler& scheduler_, Size size_, float pixelRatio_, + std::shared_ptr<FileSource> fileSource_, const MapOptions& mapOptions) : observer(observer_), rendererFrontend(frontend_), - fileSource(fileSource_), scheduler(scheduler_), transform(observer, mapOptions.constrainMode(), mapOptions.viewportMode()), mode(mapOptions.mapMode()), pixelRatio(pixelRatio_), crossSourceCollisions(mapOptions.crossSourceCollisions()), - style(std::make_unique<style::Style>(scheduler, fileSource, pixelRatio)), + fileSource(std::move(fileSource_)), + style(std::make_unique<style::Style>(scheduler, *fileSource, pixelRatio)), annotationManager(*style) { style->impl->setObserver(this); rendererFrontend.setObserver(*this); @@ -65,7 +66,7 @@ void Map::Impl::onUpdate() { style->impl->getSourceImpls(), style->impl->getLayerImpls(), annotationManager, - fileSource, + *fileSource, prefetchZoomDelta, bool(stillImageRequest), crossSourceCollisions |