From bffee0715458530c6c86f440f757a4de667278a2 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 12 Mar 2015 15:54:54 -0700 Subject: [PATCH] Move atlas ownership to Style This follows gl-js and just makes sense -- whenever the style changes the atlases should be blown away. Refs #957 --- include/mbgl/map/map.hpp | 14 ---- src/mbgl/map/map.cpp | 103 +++------------------------ src/mbgl/renderer/painter.cpp | 16 ++--- src/mbgl/renderer/painter.hpp | 8 +-- src/mbgl/renderer/painter_fill.cpp | 6 +- src/mbgl/renderer/painter_line.cpp | 14 ++-- src/mbgl/renderer/painter_symbol.cpp | 10 +-- src/mbgl/style/style.cpp | 81 ++++++++++++++++++--- src/mbgl/style/style.hpp | 31 ++++++-- test/miscellaneous/style_parser.cpp | 28 ++++---- 10 files changed, 149 insertions(+), 162 deletions(-) diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 44a560a46..5d8b66ab1 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -23,7 +23,6 @@ namespace mbgl { class Painter; -class GlyphStore; class LayerDescription; class Sprite; class Style; @@ -33,9 +32,6 @@ class StyleSource; class TexturePool; class FileSource; class View; -class GlyphAtlas; -class SpriteAtlas; -class LineAtlas; class Environment; class Map : private util::noncopyable { @@ -153,7 +149,6 @@ private: void resize(uint16_t width, uint16_t height, float ratio = 1); void resize(uint16_t width, uint16_t height, float ratio, uint16_t fbWidth, uint16_t fbHeight); - util::ptr getSprite(); uv::worker& getWorker(); // Checks if render thread needs to pause @@ -163,8 +158,6 @@ private: void setup(); void updateTiles(); - void updateSources(); - void updateSources(const util::ptr &group); // Prepares a map render by updating the tiles we need for the current view, as well as updating // the stylesheet. @@ -213,11 +206,6 @@ private: FileSource& fileSource; util::ptr