From 0c985c024b4db6c8063648d493830c67ebff50bc Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 13 Mar 2015 13:05:32 -0700 Subject: [PATCH] Revert "Move atlas ownership to Style" This reverts commit bffee0715458530c6c86f440f757a4de667278a2. --- 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, 162 insertions(+), 149 deletions(-) diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 5d8b66ab1..44a560a46 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -23,6 +23,7 @@ namespace mbgl { class Painter; +class GlyphStore; class LayerDescription; class Sprite; class Style; @@ -32,6 +33,9 @@ class StyleSource; class TexturePool; class FileSource; class View; +class GlyphAtlas; +class SpriteAtlas; +class LineAtlas; class Environment; class Map : private util::noncopyable { @@ -149,6 +153,7 @@ 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 @@ -158,6 +163,8 @@ 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. @@ -206,6 +213,11 @@ private: FileSource& fileSource; util::ptr