summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2015-08-30 18:45:24 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2015-09-02 23:18:29 +0300
commit227776dee04d440c0b6082def2bf5e40da65ecbc (patch)
tree2e42afae188af801c2df92ebfc052a700b35e2d7 /src
parent322e1aa2c3c2570554a2fe2bbfa733ab7bbd4e81 (diff)
downloadqtlocation-mapboxgl-227776dee04d440c0b6082def2bf5e40da65ecbc.tar.gz
Style no longer requires mainloop access
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/map_context.cpp4
-rw-r--r--src/mbgl/style/style.cpp3
-rw-r--r--src/mbgl/style/style.hpp4
3 files changed, 4 insertions, 7 deletions
diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp
index 17d3a87ccc..c36b4fc9d6 100644
--- a/src/mbgl/map/map_context.cpp
+++ b/src/mbgl/map/map_context.cpp
@@ -104,7 +104,7 @@ void MapContext::setStyleURL(const std::string& url) {
styleURL = url;
styleJSON.clear();
- style = std::make_unique<Style>(data, asyncUpdate->get()->loop);
+ style = std::make_unique<Style>(data);
const size_t pos = styleURL.rfind('/');
std::string base = "";
@@ -127,7 +127,7 @@ void MapContext::setStyleJSON(const std::string& json, const std::string& base)
styleURL.clear();
styleJSON = json;
- style = std::make_unique<Style>(data, asyncUpdate->get()->loop);
+ style = std::make_unique<Style>(data);
loadStyleJSON(json, base);
}
diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp
index 5f92bb2664..7686215301 100644
--- a/src/mbgl/style/style.cpp
+++ b/src/mbgl/style/style.cpp
@@ -12,7 +12,6 @@
#include <mbgl/geometry/sprite_atlas.hpp>
#include <mbgl/geometry/line_atlas.hpp>
#include <mbgl/util/constants.hpp>
-#include <mbgl/util/uv_detail.hpp>
#include <mbgl/platform/log.hpp>
#include <csscolorparser/csscolorparser.hpp>
@@ -22,7 +21,7 @@
namespace mbgl {
-Style::Style(MapData& data_, uv_loop_t*)
+Style::Style(MapData& data_)
: data(data_),
glyphStore(std::make_unique<GlyphStore>()),
glyphAtlas(std::make_unique<GlyphAtlas>(1024, 1024)),
diff --git a/src/mbgl/style/style.hpp b/src/mbgl/style/style.hpp
index 6d8a7ae522..cbc0ee2db2 100644
--- a/src/mbgl/style/style.hpp
+++ b/src/mbgl/style/style.hpp
@@ -8,7 +8,6 @@
#include <mbgl/map/sprite.hpp>
#include <mbgl/text/glyph_store.hpp>
-#include <mbgl/util/uv.hpp>
#include <mbgl/util/ptr.hpp>
#include <mbgl/util/noncopyable.hpp>
#include <mbgl/util/chrono.hpp>
@@ -32,8 +31,7 @@ class Style : public GlyphStore::Observer,
public Sprite::Observer,
public util::noncopyable {
public:
- Style(MapData&,
- uv_loop_t*);
+ Style(MapData&);
~Style();
class Observer {