diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-11-19 16:08:18 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-12-01 09:15:05 -0800 |
commit | 58886842bc381cd30bac7102d4f70497c0128aa7 (patch) | |
tree | 572ffb0f76aa4bcb6a86ef4ea506335adf636309 /src/mbgl/map/map_context.hpp | |
parent | 40ebf5d0d08138c353d7c0e4bc61ee53dceae410 (diff) | |
download | qtlocation-mapboxgl-58886842bc381cd30bac7102d4f70497c0128aa7.tar.gz |
[core] Move MapData storage to MapContext
This allows MapData members to hold GL resources which must be released
on the MapContext thread -- necessary for the following commit.
Diffstat (limited to 'src/mbgl/map/map_context.hpp')
-rw-r--r-- | src/mbgl/map/map_context.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mbgl/map/map_context.hpp b/src/mbgl/map/map_context.hpp index c0ee68a614..06be31ed85 100644 --- a/src/mbgl/map/map_context.hpp +++ b/src/mbgl/map/map_context.hpp @@ -5,6 +5,7 @@ #include <mbgl/map/update.hpp> #include <mbgl/map/transform_state.hpp> #include <mbgl/map/map.hpp> +#include <mbgl/map/map_data.hpp> #include <mbgl/style/style.hpp> #include <mbgl/util/async_task.hpp> #include <mbgl/util/gl_object_store.hpp> @@ -27,9 +28,11 @@ struct FrameData { class MapContext : public Style::Observer { public: - MapContext(View&, FileSource&, MapData&); + MapContext(View&, FileSource&, MapMode, GLContextMode, const float pixelRatio); ~MapContext(); + MapData& getData() { return data; } + void pause(); void triggerUpdate(const TransformState&, Update = Update::Nothing); @@ -69,6 +72,7 @@ private: void loadStyleJSON(const std::string& json, const std::string& base); View& view; + std::unique_ptr<MapData> dataPtr; MapData& data; util::GLObjectStore glObjectStore; |