[core] Include pixelRatio property in MapOptions

Move pixelRatio property from Map constructor to MapOptions.
This commit is contained in:
Sudarsana Babu Nagineni
2019-03-27 19:17:04 +02:00
parent f5064e7108
commit 7af00a404f
28 changed files with 107 additions and 74 deletions

View File

@@ -10,7 +10,6 @@ namespace mbgl {
Map::Impl::Impl(RendererFrontend& frontend_,
MapObserver& observer_,
Scheduler& scheduler_,
float pixelRatio_,
std::shared_ptr<FileSource> fileSource_,
const MapOptions& mapOptions)
: observer(observer_),
@@ -18,7 +17,7 @@ Map::Impl::Impl(RendererFrontend& frontend_,
scheduler(scheduler_),
transform(observer, mapOptions.constrainMode(), mapOptions.viewportMode()),
mode(mapOptions.mapMode()),
pixelRatio(pixelRatio_),
pixelRatio(mapOptions.pixelRatio()),
crossSourceCollisions(mapOptions.crossSourceCollisions()),
fileSource(std::move(fileSource_)),
style(std::make_unique<style::Style>(scheduler, *fileSource, pixelRatio)),