diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-06-25 13:58:34 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-06-26 10:32:07 -0700 |
commit | 07a6d2ef647e44151c269de2abdc98c89b0ae910 (patch) | |
tree | 82f423c9bafa82299d097447ff9a4785437d409b /test/style | |
parent | e87a36444f5210b50331fa8f456be110534dec81 (diff) | |
download | qtlocation-mapboxgl-07a6d2ef647e44151c269de2abdc98c89b0ae910.tar.gz |
Move Transform from MapData to Map
Pass current state to MapContext where needed. Remove mutex from
Transform.
Diffstat (limited to 'test/style')
-rw-r--r-- | test/style/resource_loading.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/style/resource_loading.cpp b/test/style/resource_loading.cpp index 82784f673c..36137f1adc 100644 --- a/test/style/resource_loading.cpp +++ b/test/style/resource_loading.cpp @@ -4,7 +4,7 @@ #include "mock_file_source.hpp" #include <mbgl/map/map_data.hpp> -#include <mbgl/map/transform_state.hpp> +#include <mbgl/map/transform.hpp> #include <mbgl/style/style.hpp> #include <mbgl/util/exception.hpp> #include <mbgl/util/io.hpp> @@ -24,12 +24,13 @@ public: View& view, FileSource& fileSource, const std::function<void(std::exception_ptr error)>& callback) - : data_(view, MapMode::Still), + : data_(MapMode::Still), + transform_(view), callback_(callback) { util::ThreadContext::setFileSource(&fileSource); - data_.transform.resize(1000, 1000, 1.0, 1000, 1000); - data_.transform.setLatLngZoom({0, 0}, 16); + transform_.resize(1000, 1000, 1.0, 1000, 1000); + transform_.setLatLngZoom({0, 0}, 16); const std::string style = util::read_file("test/fixtures/resources/style.json"); style_ = std::make_unique<Style>(style, "", loop), @@ -44,10 +45,9 @@ public: const auto now = Clock::now(); data_.setAnimationTime(now); - data_.transform.updateTransitions(now); + transform_.updateTransitions(now); - transformState_ = data_.transform.currentState(); - style_->update(data_, transformState_, texturePool_); + style_->update(data_, transform_.currentState(), texturePool_); } // Style::Observer implementation. @@ -65,7 +65,7 @@ public: private: MapData data_; - TransformState transformState_; + Transform transform_; TexturePool texturePool_; std::unique_ptr<Style> style_; |