summaryrefslogtreecommitdiff
path: root/src/mbgl/text/glyph_pbf.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/text/glyph_pbf.hpp')
-rw-r--r--src/mbgl/text/glyph_pbf.hpp26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/mbgl/text/glyph_pbf.hpp b/src/mbgl/text/glyph_pbf.hpp
index d595298516..e0f65e7789 100644
--- a/src/mbgl/text/glyph_pbf.hpp
+++ b/src/mbgl/text/glyph_pbf.hpp
@@ -2,6 +2,7 @@
#define MBGL_TEXT_GLYPH_PBF
#include <mbgl/text/glyph.hpp>
+#include <mbgl/text/glyph_store.hpp>
#include <mbgl/util/noncopyable.hpp>
#include <atomic>
@@ -11,43 +12,30 @@
namespace mbgl {
-class GlyphStore;
class FontStack;
class FileRequest;
class GlyphPBF : private util::noncopyable {
public:
- class Observer {
- public:
- virtual ~Observer() = default;
-
- virtual void onGlyphPBFLoaded() = 0;
- virtual void onGlyphPBFLoadingFailed(std::exception_ptr error) = 0;
- };
-
GlyphPBF(GlyphStore* store,
const std::string& fontStack,
- const GlyphRange& glyphRange);
- virtual ~GlyphPBF();
+ const GlyphRange&,
+ GlyphStore::Observer*);
+ ~GlyphPBF();
bool isParsed() const {
return parsed;
- };
-
- void setObserver(Observer* observer);
+ }
private:
- void emitGlyphPBFLoaded();
- void emitGlyphPBFLoadingFailed(const std::string& message);
-
- void parse(GlyphStore* store, const std::string& fontStack, const std::string& url);
+ void parse(GlyphStore*, const std::string& fontStack, const GlyphRange&);
std::shared_ptr<const std::string> data;
std::atomic<bool> parsed;
std::unique_ptr<FileRequest> req;
- Observer* observer = nullptr;
+ GlyphStore::Observer* observer = nullptr;
};
} // namespace mbgl