diff options
author | Chris Loer <chris.loer@gmail.com> | 2018-11-20 20:04:19 +0100 |
---|---|---|
committer | Łukasz Paczos <lukas.paczos@gmail.com> | 2018-11-30 18:50:19 +0100 |
commit | c11c64a5b6f71ea879e3ae7a9fb4e784d87ef854 (patch) | |
tree | 6b4c855b88f88cddc8d200572167e43b3606b81b | |
parent | 295d1a36432d2d38a71a499ccc66f7b565c3b778 (diff) | |
download | qtlocation-mapboxgl-c11c64a5b6f71ea879e3ae7a9fb4e784d87ef854.tar.gz |
[core] Expose "local ideograph font family" in MapSnapshotter.
(cherry picked from commit afdc243)
-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(); |