summaryrefslogtreecommitdiff
path: root/src/mbgl/text/glyph_pbf.hpp
blob: 93b7c9db762ef8e23afe072605b9db0eb0db143f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef MBGL_TEXT_GLYPH_PBF
#define MBGL_TEXT_GLYPH_PBF

#include <mbgl/text/glyph.hpp>
#include <mbgl/text/glyph_store.hpp>
#include <mbgl/util/noncopyable.hpp>

#include <atomic>
#include <functional>
#include <string>
#include <memory>

namespace mbgl {

class FontStack;
class AsyncRequest;
class FileSource;

class GlyphPBF : private util::noncopyable {
public:
    GlyphPBF(GlyphStore* store,
             const std::string& fontStack,
             const GlyphRange&,
             GlyphStore::Observer*,
             FileSource&);
    ~GlyphPBF();

    bool isParsed() const {
        return parsed;
    }

private:
    std::atomic<bool> parsed;
    std::unique_ptr<AsyncRequest> req;
    GlyphStore::Observer* observer = nullptr;
};

} // namespace mbgl

#endif