summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-11-20 20:04:19 +0100
committerŁukasz Paczos <lukasz.paczos@mapbox.com>2018-11-30 21:19:16 +0100
commit806cb4ae4ce2d954a9f4aec5121ac847ad99c515 (patch)
treecfc8f501034344b6a3ff85a7ac6f57f1d4968c6c
parenta9afa9d73671179feb1a45b2e4118a294a6e7c75 (diff)
downloadqtlocation-mapboxgl-806cb4ae4ce2d954a9f4aec5121ac847ad99c515.tar.gz
[core] Expose "local ideograph font family" in MapSnapshotter.
(cherry picked from commit afdc243)
-rw-r--r--platform/default/mbgl/map/map_snapshotter.cpp13
-rw-r--r--platform/default/mbgl/map/map_snapshotter.hpp3
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();