diff options
Diffstat (limited to 'src/mbgl/text/glyph_store.cpp')
-rw-r--r-- | src/mbgl/text/glyph_store.cpp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/mbgl/text/glyph_store.cpp b/src/mbgl/text/glyph_store.cpp index 047db17b7d..a3d1530e3d 100644 --- a/src/mbgl/text/glyph_store.cpp +++ b/src/mbgl/text/glyph_store.cpp @@ -7,6 +7,9 @@ namespace mbgl { +GlyphStore::GlyphStore() = default; +GlyphStore::~GlyphStore() = default; + void GlyphStore::requestGlyphRange(const std::string& fontStackName, const GlyphRange& range) { assert(util::ThreadContext::currentlyOn(util::ThreadType::Map)); @@ -18,10 +21,8 @@ void GlyphStore::requestGlyphRange(const std::string& fontStackName, const Glyph return; } - auto glyphPBF = std::make_unique<GlyphPBF>(this, fontStackName, range); - glyphPBF->setObserver(this); - - rangeSets.emplace(range, std::move(glyphPBF)); + rangeSets.emplace(range, + std::make_unique<GlyphPBF>(this, fontStackName, range, observer)); } @@ -66,18 +67,6 @@ util::exclusive<FontStack> GlyphStore::getFontStack(const std::string& fontStack return { it->second.get(), std::move(lock) }; } -void GlyphStore::onGlyphPBFLoaded() { - if (observer) { - observer->onGlyphRangeLoaded(); - } -} - -void GlyphStore::onGlyphPBFLoadingFailed(std::exception_ptr error) { - if (observer) { - observer->onGlyphRangeLoadingFailed(error); - } -} - void GlyphStore::setObserver(Observer* observer_) { observer = observer_; } |