diff options
author | Chris Loer <chris.loer@gmail.com> | 2018-11-20 11:04:19 -0800 |
---|---|---|
committer | Chris Loer <chris.loer@mapbox.com> | 2018-11-24 09:57:32 -0800 |
commit | afdc243042db60fdce132b8066633be621d4b28c (patch) | |
tree | e56ddad9169b29e764e359d3173291edeaf93898 /platform/default | |
parent | 6bb1e977eafc61af39d47df083bb3de13205fae9 (diff) | |
download | qtlocation-mapboxgl-afdc243042db60fdce132b8066633be621d4b28c.tar.gz |
[core] Expose "local ideograph font family" in MapSnapshotter.
Diffstat (limited to 'platform/default')
-rw-r--r-- | platform/default/mbgl/map/map_snapshotter.cpp | 13 | ||||
-rw-r--r-- | platform/default/mbgl/map/map_snapshotter.hpp | 3 |
2 files changed, 10 insertions, 6 deletions
diff --git a/platform/default/mbgl/map/map_snapshotter.cpp b/platform/default/mbgl/map/map_snapshotter.cpp index 565f72930d..ae14b20721 100644 --- a/platform/default/mbgl/map/map_snapshotter.cpp +++ b/platform/default/mbgl/map/map_snapshotter.cpp @@ -20,7 +20,8 @@ public: const float pixelRatio, const optional<CameraOptions> cameraOptions, const optional<LatLngBounds> region, - const optional<std::string> programCacheDir); + const optional<std::string> programCacheDir, + const optional<std::string> localFontFamily = {}); void setStyleURL(std::string styleURL); std::string getStyleURL() const; @@ -52,9 +53,10 @@ MapSnapshotter::Impl::Impl(FileSource* fileSource, const float pixelRatio, const optional<CameraOptions> cameraOptions, const optional<LatLngBounds> region, - const optional<std::string> programCacheDir) + const optional<std::string> programCacheDir, + const optional<std::string> localFontFamily) : scheduler(std::move(scheduler_)) - , frontend(size, pixelRatio, *fileSource, *scheduler, programCacheDir) + , frontend(size, pixelRatio, *fileSource, *scheduler, programCacheDir, GLContextMode::Unique, localFontFamily) , map(frontend, MapObserver::nullObserver(), size, pixelRatio, *fileSource, *scheduler, MapMode::Static) { if (style.first) { @@ -168,8 +170,9 @@ MapSnapshotter::MapSnapshotter(FileSource* fileSource, const float pixelRatio, const optional<CameraOptions> cameraOptions, const optional<LatLngBounds> region, - const optional<std::string> programCacheDir) - : impl(std::make_unique<util::Thread<MapSnapshotter::Impl>>("Map Snapshotter", fileSource, std::move(scheduler), style, size, pixelRatio, cameraOptions, region, programCacheDir)) { + const optional<std::string> programCacheDir, + const optional<std::string> localFontFamily) + : impl(std::make_unique<util::Thread<MapSnapshotter::Impl>>("Map Snapshotter", fileSource, std::move(scheduler), style, size, pixelRatio, cameraOptions, region, programCacheDir, localFontFamily)) { } MapSnapshotter::~MapSnapshotter() = default; diff --git a/platform/default/mbgl/map/map_snapshotter.hpp b/platform/default/mbgl/map/map_snapshotter.hpp index 264f74541d..2deb2b3cda 100644 --- a/platform/default/mbgl/map/map_snapshotter.hpp +++ b/platform/default/mbgl/map/map_snapshotter.hpp @@ -32,7 +32,8 @@ public: const float pixelRatio, const optional<CameraOptions> cameraOptions, const optional<LatLngBounds> region, - const optional<std::string> cacheDir = {}); + const optional<std::string> cacheDir = {}, + const optional<std::string> localFontFamily = {}); ~MapSnapshotter(); |