diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-02-18 10:48:51 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-02-18 15:15:24 -0800 |
commit | 7b39ce95210ceb6640b3a3399dacd1d0e826ac1f (patch) | |
tree | eb97fdc8a284826d3a3fe9426a8a10f88a654799 /src/mbgl/text/glyph_pbf.cpp | |
parent | d5eb5240f8c35016927e89bf9d186addc09b83fa (diff) | |
download | qtlocation-mapboxgl-7b39ce95210ceb6640b3a3399dacd1d0e826ac1f.tar.gz |
[core] Remove ThreadContext::getFileSource; instead thread FileSource through
Diffstat (limited to 'src/mbgl/text/glyph_pbf.cpp')
-rw-r--r-- | src/mbgl/text/glyph_pbf.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mbgl/text/glyph_pbf.cpp b/src/mbgl/text/glyph_pbf.cpp index 5973c0ce14..c9466e8652 100644 --- a/src/mbgl/text/glyph_pbf.cpp +++ b/src/mbgl/text/glyph_pbf.cpp @@ -8,7 +8,6 @@ #include <mbgl/util/exception.hpp> #include <mbgl/util/pbf.hpp> #include <mbgl/util/string.hpp> -#include <mbgl/util/thread_context.hpp> #include <mbgl/util/token.hpp> #include <mbgl/util/url.hpp> @@ -64,11 +63,11 @@ namespace mbgl { GlyphPBF::GlyphPBF(GlyphStore* store, const std::string& fontStack, const GlyphRange& glyphRange, - GlyphStore::Observer* observer_) + GlyphStore::Observer* observer_, + FileSource& fileSource) : parsed(false), observer(observer_) { - FileSource* fs = util::ThreadContext::getFileSource(); - req = fs->request(Resource::glyphs(store->getURL(), fontStack, glyphRange), [this, store, fontStack, glyphRange](Response res) { + req = fileSource.request(Resource::glyphs(store->getURL(), fontStack, glyphRange), [this, store, fontStack, glyphRange](Response res) { if (res.error) { observer->onGlyphsError(fontStack, glyphRange, std::make_exception_ptr(std::runtime_error(res.error->message))); } else if (res.notModified) { |