Move Environment to MapContext

This commit is contained in:
John Firebaugh
2015-04-23 15:58:27 -07:00
parent bb7c453b3e
commit 8bb7fc64ff
4 changed files with 10 additions and 38 deletions

View File

@@ -8,9 +8,6 @@
#include <mbgl/util/ptr.hpp>
#include <vector>
#include <queue>
#include <future>
#include <thread>
typedef struct uv_loop_s uv_loop_t;
@@ -20,7 +17,6 @@ class async;
namespace mbgl {
class Environment;
class View;
class MapData;
class GlyphStore;
@@ -38,7 +34,7 @@ struct LatLngBounds;
class MapContext {
public:
MapContext(uv_loop_t*, Environment&, View&, MapData&, bool startPaused);
MapContext(uv_loop_t*, View&, FileSource&, MapData&, bool startPaused);
~MapContext();
void pause();
@@ -72,11 +68,11 @@ private:
// Loads the actual JSON object an creates a new Style object.
void loadStyleJSON(const std::string& json, const std::string& base);
Environment& env;
View& view;
MapData& data;
EnvironmentScope mapScope;
Environment env;
EnvironmentScope envScope;
std::atomic<UpdateType> updated { static_cast<UpdateType>(Update::Nothing) };
std::unique_ptr<uv::async> asyncUpdate;