summaryrefslogtreecommitdiff
path: root/src/mbgl/map/map_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/map/map_impl.cpp')
-rw-r--r--src/mbgl/map/map_impl.cpp9
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