summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2017-11-27 12:50:28 -0800
committerChris Loer <chris.loer@mapbox.com>2017-12-18 12:17:22 -0800
commitf1f2ebb019980d4c53d563d3495e016d50e23945 (patch)
tree62dd4a29a1e2c4680d59713cc2f6d101a1dab22b /src/mbgl/renderer
parenta53818a10b821218b86478e048a3884db93f7c00 (diff)
downloadqtlocation-mapboxgl-f1f2ebb019980d4c53d563d3495e016d50e23945.tar.gz
[core] Hook LocalGlyphRasterizer "font family" configuration up to Renderer
Diffstat (limited to 'src/mbgl/renderer')
-rw-r--r--src/mbgl/renderer/renderer.cpp5
-rw-r--r--src/mbgl/renderer/renderer_impl.cpp5
-rw-r--r--src/mbgl/renderer/renderer_impl.hpp2
3 files changed, 7 insertions, 5 deletions
diff --git a/src/mbgl/renderer/renderer.cpp b/src/mbgl/renderer/renderer.cpp
index 8953b419f7..6d086c70b1 100644
--- a/src/mbgl/renderer/renderer.cpp
+++ b/src/mbgl/renderer/renderer.cpp
@@ -10,9 +10,10 @@ Renderer::Renderer(RendererBackend& backend,
FileSource& fileSource_,
Scheduler& scheduler_,
GLContextMode contextMode_,
- const optional<std::string> programCacheDir_)
+ const optional<std::string> programCacheDir_,
+ const optional<std::string> localFontFamily_)
: impl(std::make_unique<Impl>(backend, pixelRatio_, fileSource_, scheduler_,
- contextMode_, std::move(programCacheDir_))) {
+ contextMode_, std::move(programCacheDir_), std::move(localFontFamily_))) {
}
Renderer::~Renderer() {
diff --git a/src/mbgl/renderer/renderer_impl.cpp b/src/mbgl/renderer/renderer_impl.cpp
index 7339756e52..3a7afdb03d 100644
--- a/src/mbgl/renderer/renderer_impl.cpp
+++ b/src/mbgl/renderer/renderer_impl.cpp
@@ -42,7 +42,8 @@ Renderer::Impl::Impl(RendererBackend& backend_,
FileSource& fileSource_,
Scheduler& scheduler_,
GLContextMode contextMode_,
- const optional<std::string> programCacheDir_)
+ const optional<std::string> programCacheDir_,
+ const optional<std::string> localFontFamily_)
: backend(backend_)
, scheduler(scheduler_)
, fileSource(fileSource_)
@@ -50,7 +51,7 @@ Renderer::Impl::Impl(RendererBackend& backend_,
, contextMode(contextMode_)
, pixelRatio(pixelRatio_)
, programCacheDir(programCacheDir_)
- , glyphManager(std::make_unique<GlyphManager>(fileSource))
+ , glyphManager(std::make_unique<GlyphManager>(fileSource, std::make_unique<LocalGlyphRasterizer>(localFontFamily_)))
, imageManager(std::make_unique<ImageManager>())
, lineAtlas(std::make_unique<LineAtlas>(Size{ 256, 512 }))
, imageImpls(makeMutable<std::vector<Immutable<style::Image::Impl>>>())
diff --git a/src/mbgl/renderer/renderer_impl.hpp b/src/mbgl/renderer/renderer_impl.hpp
index db2a6e7a74..a199cec4d0 100644
--- a/src/mbgl/renderer/renderer_impl.hpp
+++ b/src/mbgl/renderer/renderer_impl.hpp
@@ -36,7 +36,7 @@ class Renderer::Impl : public GlyphManagerObserver,
public RenderSourceObserver{
public:
Impl(RendererBackend&, float pixelRatio_, FileSource&, Scheduler&, GLContextMode,
- const optional<std::string> programCacheDir);
+ const optional<std::string> programCacheDir, const optional<std::string> localFontFamily);
~Impl() final;
void markContextLost() {