diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2014-11-20 19:25:38 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2014-11-21 14:25:12 -0800 |
commit | c3940cf08251f9fc9bfce4911e7b24f5985ae105 (patch) | |
tree | a9dcf038704f3b8f04667f9ba59b194b1c7eb151 /include | |
parent | 9e971095d3561f7af5b0016614035a8b4e479b81 (diff) | |
download | qtlocation-mapboxgl-c3940cf08251f9fc9bfce4911e7b24f5985ae105.tar.gz |
Eliminate Map::getFileSource
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/map/map.hpp | 1 | ||||
-rw-r--r-- | include/mbgl/map/source.hpp | 9 | ||||
-rw-r--r-- | include/mbgl/map/tile_data.hpp | 3 |
3 files changed, 7 insertions, 6 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index ad33865cd7..ab5311741f 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -126,7 +126,6 @@ public: public: inline const TransformState &getState() const { return state; } - inline util::ptr<FileSource> getFileSource() const { return fileSource; } inline util::ptr<Style> getStyle() const { return style; } inline GlyphAtlas & getGlyphAtlas() { return glyphAtlas; } inline util::ptr<GlyphStore> getGlyphStore() { return glyphStore; } diff --git a/include/mbgl/map/source.hpp b/include/mbgl/map/source.hpp index e74ddb9902..46fcbdaf61 100644 --- a/include/mbgl/map/source.hpp +++ b/include/mbgl/map/source.hpp @@ -18,6 +18,7 @@ namespace mbgl { class Map; +class FileSource; class Painter; class StyleLayer; class TransformState; @@ -27,9 +28,9 @@ class Source : public std::enable_shared_from_this<Source>, private util::noncop public: Source(const util::ptr<SourceInfo>& info); - void load(Map &map); + void load(Map&, FileSource&); + bool update(Map&, FileSource&); - bool update(Map &map); void updateMatrices(const mat4 &projMatrix, const TransformState &transform); void drawClippingMasks(Painter &painter); size_t getTileCount() const; @@ -47,9 +48,9 @@ private: int32_t coveringZoomLevel(const TransformState&) const; std::forward_list<Tile::ID> coveringTiles(const TransformState&) const; - bool updateTiles(Map &map); + bool updateTiles(Map&, FileSource&); - TileData::State addTile(Map &map, const Tile::ID& id); + TileData::State addTile(Map&, FileSource&, const Tile::ID&); TileData::State hasTile(const Tile::ID& id); double getZoom(const TransformState &state) const; diff --git a/include/mbgl/map/tile_data.hpp b/include/mbgl/map/tile_data.hpp index d6666f2f70..baae542e49 100644 --- a/include/mbgl/map/tile_data.hpp +++ b/include/mbgl/map/tile_data.hpp @@ -16,6 +16,7 @@ namespace mbgl { class Map; +class FileSource; class Painter; class SourceInfo; class StyleLayer; @@ -43,7 +44,7 @@ public: TileData(Tile::ID const& id, Map &map, const util::ptr<SourceInfo> &source); ~TileData(); - void request(); + void request(FileSource&); void cancel(); void reparse(); const std::string toString() const; |