summaryrefslogtreecommitdiff
path: root/src/mbgl/layout
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-09-15 17:03:13 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-09-19 09:40:43 -0700
commitdc1861f6d5391707126a20dbb0272f5bd3522de8 (patch)
tree961a3612706b9466d9ff0ef278ae1206b821aa88 /src/mbgl/layout
parent940124ff713a960d7f70071779dd37d07010fa80 (diff)
downloadqtlocation-mapboxgl-dc1861f6d5391707126a20dbb0272f5bd3522de8.tar.gz
[core] Merge GlyphStore and GlyphAtlas
Diffstat (limited to 'src/mbgl/layout')
-rw-r--r--src/mbgl/layout/symbol_layout.cpp13
-rw-r--r--src/mbgl/layout/symbol_layout.hpp6
2 files changed, 8 insertions, 11 deletions
diff --git a/src/mbgl/layout/symbol_layout.cpp b/src/mbgl/layout/symbol_layout.cpp
index 277376a4e3..b25bb18ac4 100644
--- a/src/mbgl/layout/symbol_layout.cpp
+++ b/src/mbgl/layout/symbol_layout.cpp
@@ -4,9 +4,9 @@
#include <mbgl/renderer/symbol_bucket.hpp>
#include <mbgl/style/filter_evaluator.hpp>
#include <mbgl/sprite/sprite_atlas.hpp>
-#include <mbgl/geometry/glyph_atlas.hpp>
+#include <mbgl/text/glyph_atlas.hpp>
#include <mbgl/text/get_anchors.hpp>
-#include <mbgl/text/glyph_store.hpp>
+#include <mbgl/text/glyph_atlas.hpp>
#include <mbgl/text/collision_tile.hpp>
#include <mbgl/util/utf.hpp>
#include <mbgl/util/token.hpp>
@@ -124,8 +124,8 @@ bool SymbolLayout::hasSymbolInstances() const {
return !symbolInstances.empty();
}
-bool SymbolLayout::canPrepare(GlyphStore& glyphStore) {
- if (!layout.textField.value.empty() && !layout.textFont.value.empty() && !glyphStore.hasGlyphRanges(layout.textFont, ranges)) {
+bool SymbolLayout::canPrepare(GlyphAtlas& glyphAtlas) {
+ if (!layout.textField.value.empty() && !layout.textFont.value.empty() && !glyphAtlas.hasGlyphRanges(layout.textFont, ranges)) {
return false;
}
@@ -137,8 +137,7 @@ bool SymbolLayout::canPrepare(GlyphStore& glyphStore) {
}
void SymbolLayout::prepare(uintptr_t tileUID,
- GlyphAtlas& glyphAtlas,
- GlyphStore& glyphStore) {
+ GlyphAtlas& glyphAtlas) {
float horizontalAlign = 0.5;
float verticalAlign = 0.5;
@@ -180,7 +179,7 @@ void SymbolLayout::prepare(uintptr_t tileUID,
layout.textJustify == TextJustifyType::Left ? 0 :
0.5;
- auto glyphSet = glyphStore.getGlyphSet(layout.textFont);
+ auto glyphSet = glyphAtlas.getGlyphSet(layout.textFont);
for (const auto& feature : features) {
if (feature.geometry.empty()) continue;
diff --git a/src/mbgl/layout/symbol_layout.hpp b/src/mbgl/layout/symbol_layout.hpp
index 000dacaf3a..db27f1b817 100644
--- a/src/mbgl/layout/symbol_layout.hpp
+++ b/src/mbgl/layout/symbol_layout.hpp
@@ -16,7 +16,6 @@ class GeometryTileLayer;
class CollisionTile;
class SpriteAtlas;
class GlyphAtlas;
-class GlyphStore;
class SymbolBucket;
namespace style {
@@ -38,11 +37,10 @@ public:
float textMaxSize,
SpriteAtlas&);
- bool canPrepare(GlyphStore&);
+ bool canPrepare(GlyphAtlas&);
void prepare(uintptr_t tileUID,
- GlyphAtlas&,
- GlyphStore&);
+ GlyphAtlas&);
std::unique_ptr<SymbolBucket> place(CollisionTile&);