summaryrefslogtreecommitdiff
path: root/src/mbgl/text/glyph_set.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-04-06 07:06:51 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-04-12 16:57:52 -0700
commit08101921633ded8978c003179c5f324c91aac266 (patch)
treecf65d7ff383548ada33791c01f95d1b5070098de /src/mbgl/text/glyph_set.cpp
parent258ac8219a741476965581a6c6ab866ab8c57fe5 (diff)
downloadqtlocation-mapboxgl-08101921633ded8978c003179c5f324c91aac266.tar.gz
[core] Inline GlyphSet into GlyphAtlas
Diffstat (limited to 'src/mbgl/text/glyph_set.cpp')
-rw-r--r--src/mbgl/text/glyph_set.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/mbgl/text/glyph_set.cpp b/src/mbgl/text/glyph_set.cpp
deleted file mode 100644
index 3305d4136e..0000000000
--- a/src/mbgl/text/glyph_set.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <mbgl/text/glyph_set.hpp>
-#include <mbgl/util/logging.hpp>
-
-namespace mbgl {
-
-void GlyphSet::insert(SDFGlyph&& glyph) {
- auto it = sdfs.find(glyph.id);
- if (it == sdfs.end()) {
- // Glyph doesn't exist yet.
- sdfs.emplace(glyph.id, std::move(glyph));
- } else if (it->second.metrics == glyph.metrics) {
- if (it->second.bitmap != glyph.bitmap) {
- // The actual bitmap was updated; this is unsupported.
- Log::Warning(Event::Glyph, "Modified glyph changed bitmap represenation");
- }
- // At least try to update it in case it's currently unsused.
- // If it is already used; we won't attempt to update the glyph atlas texture.
- it->second.bitmap = std::move(glyph.bitmap);
- } else {
- // The metrics were updated; this is unsupported.
- Log::Warning(Event::Glyph, "Modified glyph has different metrics");
- return;
- }
-}
-
-const std::map<uint32_t, SDFGlyph>& GlyphSet::getSDFs() const {
- return sdfs;
-}
-
-} // end namespace mbgl