summaryrefslogtreecommitdiff
path: root/src/mbgl/sprite/sprite_atlas.hpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-02-13 13:52:16 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-02-14 16:28:12 -0600
commit3fa6a4f4ff148303a14a751009f5596aa3f7effc (patch)
tree903c9f1f2732c3e34a9fe03afad03af9600e7cd4 /src/mbgl/sprite/sprite_atlas.hpp
parent44fa4d6aad324947fc323a9cdd462d4475e2b9cd (diff)
downloadqtlocation-mapboxgl-3fa6a4f4ff148303a14a751009f5596aa3f7effc.tar.gz
[core] Eliminate SpriteAtlas::Holder
Diffstat (limited to 'src/mbgl/sprite/sprite_atlas.hpp')
-rw-r--r--src/mbgl/sprite/sprite_atlas.hpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/mbgl/sprite/sprite_atlas.hpp b/src/mbgl/sprite/sprite_atlas.hpp
index c79aec135e..9f4e20a0de 100644
--- a/src/mbgl/sprite/sprite_atlas.hpp
+++ b/src/mbgl/sprite/sprite_atlas.hpp
@@ -123,21 +123,14 @@ private:
// Stores all Sprite IDs that changed since the last invocation.
Sprites dirtySprites;
- struct Holder : private util::noncopyable {
- Holder(std::shared_ptr<const SpriteImage>, Rect<uint16_t>);
- Holder(Holder&&);
- std::shared_ptr<const SpriteImage> spriteImage;
- const Rect<uint16_t> pos;
- };
-
using Key = std::pair<std::string, SpritePatternMode>;
Rect<uint16_t> allocateImage(const SpriteImage&);
- void copy(const Holder& holder, SpritePatternMode mode);
+ void copy(const PremultipliedImage&, Rect<uint16_t>, SpritePatternMode);
std::recursive_mutex mtx;
BinPack<uint16_t> bin;
- std::map<Key, Holder> images;
+ std::map<Key, SpriteAtlasElement> images;
std::unordered_set<std::string> uninitialized;
PremultipliedImage image;
mbgl::optional<gl::Texture> texture;