diff options
author | artemp <artem@mapnik.org> | 2014-10-29 14:09:06 -0400 |
---|---|---|
committer | artemp <artem@mapnik.org> | 2014-10-29 14:09:06 -0400 |
commit | 2607a755afd347eba0c1422b77603b8ddcb097c6 (patch) | |
tree | c88f9a312d35c919d99601b39f17e659a2cb1751 /include | |
parent | 92f99cbc16a3e468b757ce179889e92317919cec (diff) | |
download | qtlocation-mapboxgl-2607a755afd347eba0c1422b77603b8ddcb097c6.tar.gz |
store spriteAtlas by value + make TileParser noncopyable
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/map/map.hpp | 6 | ||||
-rw-r--r-- | include/mbgl/map/tile_parser.hpp | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index d5e725241a..382b6745d2 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -4,6 +4,7 @@ #include <mbgl/map/transform.hpp> #include <mbgl/renderer/painter.hpp> #include <mbgl/geometry/glyph_atlas.hpp> +#include <mbgl/geometry/sprite_atlas.hpp> #include <mbgl/util/noncopyable.hpp> #include <mbgl/util/time.hpp> #include <mbgl/util/uv.hpp> @@ -18,7 +19,6 @@ namespace mbgl { class GlyphStore; class LayerDescription; -class SpriteAtlas; class Sprite; class Style; class StyleLayer; @@ -131,7 +131,7 @@ public: inline util::ptr<Style> getStyle() const { return style; } inline GlyphAtlas & getGlyphAtlas() { return glyphAtlas; } inline util::ptr<GlyphStore> getGlyphStore() { return glyphStore; } - inline util::ptr<SpriteAtlas> getSpriteAtlas() { return spriteAtlas; } + inline SpriteAtlas & getSpriteAtlas() { return spriteAtlas; } util::ptr<Sprite> getSprite(); inline util::ptr<Texturepool> getTexturepool() { return texturepool; } inline util::ptr<uv::loop> getLoop() { return loop; } @@ -203,7 +203,7 @@ private: util::ptr<Style> style; GlyphAtlas glyphAtlas; util::ptr<GlyphStore> glyphStore; - util::ptr<SpriteAtlas> spriteAtlas; + SpriteAtlas spriteAtlas; util::ptr<Sprite> sprite; util::ptr<Texturepool> texturepool; diff --git a/include/mbgl/map/tile_parser.hpp b/include/mbgl/map/tile_parser.hpp index 383c2929ea..576c18ec94 100644 --- a/include/mbgl/map/tile_parser.hpp +++ b/include/mbgl/map/tile_parser.hpp @@ -5,7 +5,7 @@ #include <mbgl/style/filter_expression.hpp> #include <mbgl/text/glyph.hpp> #include <mbgl/util/ptr.hpp> - +#include <mbgl/util/noncopyable.hpp> #include <cstdint> #include <iosfwd> #include <string> @@ -29,13 +29,14 @@ class StyleLayerGroup; class VectorTileData; class Collision; -class TileParser { +class TileParser : private util::noncopyable +{ public: TileParser(const std::string &data, VectorTileData &tile, const util::ptr<const Style> &style, GlyphAtlas & glyphAtlas, const util::ptr<GlyphStore> &glyphStore, - const util::ptr<SpriteAtlas> &spriteAtlas, + SpriteAtlas & spriteAtlas, const util::ptr<Sprite> &sprite); ~TileParser(); @@ -62,7 +63,7 @@ private: util::ptr<const Style> style; GlyphAtlas & glyphAtlas; util::ptr<GlyphStore> glyphStore; - util::ptr<SpriteAtlas> spriteAtlas; + SpriteAtlas & spriteAtlas; util::ptr<Sprite> sprite; util::ptr<Texturepool> texturePool; |