summaryrefslogtreecommitdiff
path: root/src/mbgl/map/transform.hpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-05-03 14:53:03 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-05-05 08:56:36 -0700
commit66da7594263b657b78aff54a16905184505e275e (patch)
tree3f940c3852ff7a7d4f2b885c742e4fac06c84abc /src/mbgl/map/transform.hpp
parentfd104dd3c229ce42d149a143260407cd259b716c (diff)
downloadqtlocation-mapboxgl-66da7594263b657b78aff54a16905184505e275e.tar.gz
[core] Reduce use of RecalculateStyle
* Don't use it to track zoom changes. Instead, Style::update can use the zoom history to check for a change in zoom from the previous frame. * Don't use it to track active property transitions. Style already knows which layers/light have an active transition, and can re-evaluate only those that do. This leaves layer property changes as the only use of RecalculateStyle.
Diffstat (limited to 'src/mbgl/map/transform.hpp')
-rw-r--r--src/mbgl/map/transform.hpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mbgl/map/transform.hpp b/src/mbgl/map/transform.hpp
index 2c59a6c1aa..af2f821602 100644
--- a/src/mbgl/map/transform.hpp
+++ b/src/mbgl/map/transform.hpp
@@ -4,7 +4,6 @@
#include <mbgl/map/map_observer.hpp>
#include <mbgl/map/mode.hpp>
#include <mbgl/map/transform_state.hpp>
-#include <mbgl/map/update.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/geo.hpp>
#include <mbgl/util/noncopyable.hpp>
@@ -128,7 +127,7 @@ public:
// Transitions
bool inTransition() const;
- Update updateTransitions(const TimePoint& now);
+ void updateTransitions(const TimePoint& now);
TimePoint getTransitionStart() const { return transitionStart; }
Duration getTransitionDuration() const { return transitionDuration; }
void cancelTransitions();
@@ -153,12 +152,12 @@ private:
void startTransition(const CameraOptions&,
const AnimationOptions&,
- std::function<Update(double)>,
+ std::function<void(double)>,
const Duration&);
TimePoint transitionStart;
Duration transitionDuration;
- std::function<Update(const TimePoint)> transitionFrameFn;
+ std::function<void(const TimePoint)> transitionFrameFn;
std::function<void()> transitionFinishFn;
};