diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2014-11-21 15:44:15 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2014-11-26 15:13:13 -0800 |
commit | a5fe8ec3dc138003e16bd39e15af899d78371d77 (patch) | |
tree | b7d4b7bb22f4ebca8f89161deba993cf109c0b00 /include/mbgl/map | |
parent | 655ee501e749f8be0acb1baa0fa9c05f3993930a (diff) | |
download | qtlocation-mapboxgl-a5fe8ec3dc138003e16bd39e15af899d78371d77.tar.gz |
Eliminate Map::getGlyphAtlas()
Diffstat (limited to 'include/mbgl/map')
-rw-r--r-- | include/mbgl/map/map.hpp | 1 | ||||
-rw-r--r-- | include/mbgl/map/source.hpp | 7 | ||||
-rw-r--r-- | include/mbgl/map/vector_tile_data.hpp | 6 |
3 files changed, 9 insertions, 5 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index ab5311741f..9614645f6c 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -127,7 +127,6 @@ public: public: inline const TransformState &getState() const { return state; } inline util::ptr<Style> getStyle() const { return style; } - inline GlyphAtlas & getGlyphAtlas() { return glyphAtlas; } inline util::ptr<GlyphStore> getGlyphStore() { return glyphStore; } inline SpriteAtlas & getSpriteAtlas() { return spriteAtlas; } util::ptr<Sprite> getSprite(); diff --git a/include/mbgl/map/source.hpp b/include/mbgl/map/source.hpp index 46fcbdaf61..7643767067 100644 --- a/include/mbgl/map/source.hpp +++ b/include/mbgl/map/source.hpp @@ -18,6 +18,7 @@ namespace mbgl { class Map; +class GlyphAtlas; class FileSource; class Painter; class StyleLayer; @@ -29,7 +30,7 @@ public: Source(const util::ptr<SourceInfo>& info); void load(Map&, FileSource&); - bool update(Map&, FileSource&); + bool update(Map&, GlyphAtlas&, FileSource&); void updateMatrices(const mat4 &projMatrix, const TransformState &transform); void drawClippingMasks(Painter &painter); @@ -48,9 +49,9 @@ private: int32_t coveringZoomLevel(const TransformState&) const; std::forward_list<Tile::ID> coveringTiles(const TransformState&) const; - bool updateTiles(Map&, FileSource&); + bool updateTiles(Map&, GlyphAtlas&, FileSource&); - TileData::State addTile(Map&, FileSource&, const Tile::ID&); + TileData::State addTile(Map&, GlyphAtlas&, FileSource&, const Tile::ID&); TileData::State hasTile(const Tile::ID& id); double getZoom(const TransformState &state) const; diff --git a/include/mbgl/map/vector_tile_data.hpp b/include/mbgl/map/vector_tile_data.hpp index 070456af80..0599ae08c9 100644 --- a/include/mbgl/map/vector_tile_data.hpp +++ b/include/mbgl/map/vector_tile_data.hpp @@ -21,13 +21,15 @@ class Painter; class SourceInfo; class StyleLayer; class TileParser; +class GlyphAtlas; class VectorTileData : public TileData { friend class TileParser; public: - VectorTileData(Tile::ID const& id, Map &map, const util::ptr<SourceInfo> &source); + VectorTileData(Tile::ID const&, Map&, GlyphAtlas&, const util::ptr<SourceInfo>&); ~VectorTileData(); + virtual void parse(); virtual void render(Painter &painter, util::ptr<StyleLayer> layer_desc, const mat4 &matrix); virtual bool hasData(StyleLayer const& layer_desc) const; @@ -46,6 +48,8 @@ protected: // Holds the buckets of this tile. // They contain the location offsets in the buffers stored above std::unordered_map<std::string, std::unique_ptr<Bucket>> buckets; + GlyphAtlas& glyphAtlas; + public: const float depth; }; |