diff options
author | Langston Smith <langston.smith@mapbox.com> | 2018-01-04 11:15:50 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-04 11:15:50 -0800 |
commit | 2ea955d2751ba6459f99a0695e53505c0a11702b (patch) | |
tree | f54450918b634a2eea1bd2c4ebc671bf1bb06106 /src/mbgl/text/glyph_manager.hpp | |
parent | f2ec6ae326bad79fea2b06a21151a2835522572a (diff) | |
parent | c62b0af24fc76b4bb2eb34100611dd3ee9ee5536 (diff) | |
download | qtlocation-mapboxgl-2ea955d2751ba6459f99a0695e53505c0a11702b.tar.gz |
Merge branch 'master' into ls-android-readme-tweaksupstream/ls-android-readme-tweaks
Diffstat (limited to 'src/mbgl/text/glyph_manager.hpp')
-rw-r--r-- | src/mbgl/text/glyph_manager.hpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mbgl/text/glyph_manager.hpp b/src/mbgl/text/glyph_manager.hpp index 00df079462..84db2c4be5 100644 --- a/src/mbgl/text/glyph_manager.hpp +++ b/src/mbgl/text/glyph_manager.hpp @@ -3,6 +3,7 @@ #include <mbgl/text/glyph.hpp> #include <mbgl/text/glyph_manager_observer.hpp> #include <mbgl/text/glyph_range.hpp> +#include <mbgl/text/local_glyph_rasterizer.hpp> #include <mbgl/util/noncopyable.hpp> #include <mbgl/util/font_stack.hpp> #include <mbgl/util/immutable.hpp> @@ -24,7 +25,7 @@ public: class GlyphManager : public util::noncopyable { public: - GlyphManager(FileSource&); + GlyphManager(FileSource&, std::unique_ptr<LocalGlyphRasterizer> = std::make_unique<LocalGlyphRasterizer>(optional<std::string>())); ~GlyphManager(); // Workers send a `getGlyphs` message to the main thread once they have determined @@ -42,6 +43,8 @@ public: void setObserver(GlyphManagerObserver*); private: + Glyph generateLocalSDF(const FontStack& fontStack, GlyphID glyphID); + FileSource& fileSource; std::string glyphURL; @@ -58,11 +61,13 @@ private: std::unordered_map<FontStack, Entry, FontStackHash> entries; - GlyphRequest& requestRange(Entry&, const FontStack&, const GlyphRange&); + void requestRange(GlyphRequest&, const FontStack&, const GlyphRange&); void processResponse(const Response&, const FontStack&, const GlyphRange&); void notify(GlyphRequestor&, const GlyphDependencies&); - + GlyphManagerObserver* observer = nullptr; + + std::unique_ptr<LocalGlyphRasterizer> localGlyphRasterizer; }; } // namespace mbgl |