diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2014-11-21 15:47:35 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2014-11-26 15:13:13 -0800 |
commit | 8e33076bf116584b1ed0b9bdafdff2f0438afc26 (patch) | |
tree | 46208dbbafabae4595504e91dc0eab53a9063375 /include/mbgl/map | |
parent | a5fe8ec3dc138003e16bd39e15af899d78371d77 (diff) | |
download | qtlocation-mapboxgl-8e33076bf116584b1ed0b9bdafdff2f0438afc26.tar.gz |
Eliminate Map::getSpriteAtlas()
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 | 7 |
3 files changed, 10 insertions, 5 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 9614645f6c..635ac4d222 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -128,7 +128,6 @@ public: inline const TransformState &getState() const { return state; } inline util::ptr<Style> getStyle() const { return style; } inline util::ptr<GlyphStore> getGlyphStore() { return glyphStore; } - inline SpriteAtlas & getSpriteAtlas() { return spriteAtlas; } util::ptr<Sprite> getSprite(); inline util::ptr<Texturepool> getTexturepool() { return texturepool; } uv::worker &getWorker(); diff --git a/include/mbgl/map/source.hpp b/include/mbgl/map/source.hpp index 7643767067..2094ff0828 100644 --- a/include/mbgl/map/source.hpp +++ b/include/mbgl/map/source.hpp @@ -19,6 +19,7 @@ namespace mbgl { class Map; class GlyphAtlas; +class SpriteAtlas; class FileSource; class Painter; class StyleLayer; @@ -30,7 +31,7 @@ public: Source(const util::ptr<SourceInfo>& info); void load(Map&, FileSource&); - bool update(Map&, GlyphAtlas&, FileSource&); + bool update(Map&, GlyphAtlas&, SpriteAtlas&, FileSource&); void updateMatrices(const mat4 &projMatrix, const TransformState &transform); void drawClippingMasks(Painter &painter); @@ -49,9 +50,9 @@ private: int32_t coveringZoomLevel(const TransformState&) const; std::forward_list<Tile::ID> coveringTiles(const TransformState&) const; - bool updateTiles(Map&, GlyphAtlas&, FileSource&); + bool updateTiles(Map&, GlyphAtlas&, SpriteAtlas&, FileSource&); - TileData::State addTile(Map&, GlyphAtlas&, FileSource&, const Tile::ID&); + TileData::State addTile(Map&, GlyphAtlas&, SpriteAtlas&, 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 0599ae08c9..793aa61581 100644 --- a/include/mbgl/map/vector_tile_data.hpp +++ b/include/mbgl/map/vector_tile_data.hpp @@ -22,12 +22,15 @@ class SourceInfo; class StyleLayer; class TileParser; class GlyphAtlas; +class SpriteAtlas; class VectorTileData : public TileData { friend class TileParser; public: - VectorTileData(Tile::ID const&, Map&, GlyphAtlas&, const util::ptr<SourceInfo>&); + VectorTileData(Tile::ID const&, Map&, + GlyphAtlas&, SpriteAtlas&, + const util::ptr<SourceInfo>&); ~VectorTileData(); virtual void parse(); @@ -48,7 +51,9 @@ 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; + SpriteAtlas& spriteAtlas; public: const float depth; |