summaryrefslogtreecommitdiff
path: root/src/mbgl/text/glyph_atlas.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/text/glyph_atlas.hpp')
-rw-r--r--src/mbgl/text/glyph_atlas.hpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mbgl/text/glyph_atlas.hpp b/src/mbgl/text/glyph_atlas.hpp
index 74fb22661c..f4c4601530 100644
--- a/src/mbgl/text/glyph_atlas.hpp
+++ b/src/mbgl/text/glyph_atlas.hpp
@@ -3,7 +3,6 @@
#include <mbgl/text/glyph.hpp>
#include <mbgl/text/glyph_atlas_observer.hpp>
#include <mbgl/text/glyph_range.hpp>
-#include <mbgl/text/glyph_pbf.hpp>
#include <mbgl/geometry/binpack.hpp>
#include <mbgl/util/noncopyable.hpp>
#include <mbgl/util/optional.hpp>
@@ -71,9 +70,9 @@ private:
std::string glyphURL;
struct GlyphValue {
- GlyphValue(Rect<uint16_t> rect_, GlyphRequestor* id)
- : rect(std::move(rect_)), ids({ id }) {}
- Rect<uint16_t> rect;
+ AlphaImage bitmap;
+ GlyphMetrics metrics;
+ optional<Rect<uint16_t>> rect;
std::unordered_set<GlyphRequestor*> ids;
};
@@ -85,8 +84,7 @@ private:
struct Entry {
std::map<GlyphRange, GlyphRequest> ranges;
- std::map<uint32_t, SDFGlyph> sdfs;
- std::map<uint32_t, GlyphValue> glyphValues;
+ std::map<GlyphID, GlyphValue> glyphs;
};
std::unordered_map<FontStack, Entry, FontStackHash> entries;
@@ -95,9 +93,9 @@ private:
void processResponse(const Response&, const FontStack&, const GlyphRange&);
void addGlyphs(GlyphRequestor&, const GlyphDependencies&);
- void addGlyph(GlyphRequestor&, const FontStack&, const SDFGlyph&);
+ Rect<uint16_t> addGlyph(GlyphValue&);
- void removeGlyphValues(GlyphRequestor&, std::map<uint32_t, GlyphValue>&);
+ void removeGlyphValues(GlyphRequestor&, std::map<GlyphID, GlyphValue>&);
void removePendingRanges(GlyphRequestor&, std::map<GlyphRange, GlyphRequest>&);
GlyphAtlasObserver* observer = nullptr;