diff options
author | Langston Smith <langston.smith@mapbox.com> | 2017-10-10 17:04:11 -0700 |
---|---|---|
committer | Langston Smith <langston.smith@mapbox.com> | 2017-10-10 17:04:11 -0700 |
commit | a829c2de392b8f826e939f1a5061c111630f48e0 (patch) | |
tree | 7b0c7e2a033c3ad5489648568eb8f2fcbfcac74f /src/mbgl/text/glyph_manager.cpp | |
parent | 4d56366824b51095911dc591c664b963bc04634f (diff) | |
parent | 98a47884f06a8f165a2c15a54f82b356c8ef23d8 (diff) | |
download | qtlocation-mapboxgl-a829c2de392b8f826e939f1a5061c111630f48e0.tar.gz |
Merge branch 'master' into ls-readme-updates
Diffstat (limited to 'src/mbgl/text/glyph_manager.cpp')
-rw-r--r-- | src/mbgl/text/glyph_manager.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mbgl/text/glyph_manager.cpp b/src/mbgl/text/glyph_manager.cpp index 916d39ae62..c79a1938c1 100644 --- a/src/mbgl/text/glyph_manager.cpp +++ b/src/mbgl/text/glyph_manager.cpp @@ -36,8 +36,9 @@ void GlyphManager::getGlyphs(GlyphRequestor& requestor, GlyphDependencies glyphD for (const auto& range : ranges) { auto it = entry.ranges.find(range); if (it == entry.ranges.end() || !it->second.parsed) { - GlyphRequest& request = requestRange(entry, fontStack, range); + GlyphRequest& request = entry.ranges[range]; request.requestors[&requestor] = dependencies; + requestRange(request, fontStack, range); } } } @@ -49,18 +50,14 @@ void GlyphManager::getGlyphs(GlyphRequestor& requestor, GlyphDependencies glyphD } } -GlyphManager::GlyphRequest& GlyphManager::requestRange(Entry& entry, const FontStack& fontStack, const GlyphRange& range) { - GlyphRequest& request = entry.ranges[range]; - +void GlyphManager::requestRange(GlyphRequest& request, const FontStack& fontStack, const GlyphRange& range) { if (request.req) { - return request; + return; } request.req = fileSource.request(Resource::glyphs(glyphURL, fontStack, range), [this, fontStack, range](Response res) { processResponse(res, fontStack, range); }); - - return request; } void GlyphManager::processResponse(const Response& res, const FontStack& fontStack, const GlyphRange& range) { |