From 13564fb876f6e473d961b5e4a6a89f58d986d2e3 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 4 Dec 2014 13:28:13 -0800 Subject: [PATCH] Create GlyphStore up front --- src/mbgl/map/map.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 2113ba658..423e45ee8 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -96,6 +96,7 @@ Map::Map(View& view_, FileSource& fileSource_) transform(view_), fileSource(fileSource_), glyphAtlas(util::make_unique(1024, 1024)), + glyphStore(std::make_shared(fileSource)), spriteAtlas(util::make_unique(512, 512)), texturePool(std::make_shared()), painter(util::make_unique(*spriteAtlas, *glyphAtlas)) @@ -146,7 +147,6 @@ void Map::start() { assert(std::this_thread::get_id() == mapThread); // Remove all of these to make sure they are destructed in the correct thread. - glyphStore.reset(); style.reset(); workers.reset(); activeSources.clear(); @@ -312,7 +312,6 @@ void Map::setStyleJSON(std::string newStyleJSON, const std::string &base) { style = std::make_shared