summaryrefslogtreecommitdiff
path: root/test/style
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-05-02 11:30:07 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-05-04 09:59:56 -0700
commite7d2796762c3ba05e824177969c501ab2370336f (patch)
tree22caa9990d87f94c68b346993b5956b6792b5dbe /test/style
parent89f1ffc6d29d5631dfd322834397ec2247c5c9d7 (diff)
downloadqtlocation-mapboxgl-e7d2796762c3ba05e824177969c501ab2370336f.tar.gz
[core] Omnibus Style::update method
Combine Style::cascade, recalculate, relayout, and updateTiles into a single method. This allows multiple loops over sources and layers to be consolidated and prepares for additional Style-Map decoupling: rather than tracking pending updates via a set of Update flags held by the Map and passed to the Style, the Style can use its own data to determine what to update.
Diffstat (limited to 'test/style')
-rw-r--r--test/style/paint_property.test.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/style/paint_property.test.cpp b/test/style/paint_property.test.cpp
index 1854351f7a..fcca05f3bd 100644
--- a/test/style/paint_property.test.cpp
+++ b/test/style/paint_property.test.cpp
@@ -8,10 +8,12 @@ using namespace mbgl::style;
using namespace std::literals::chrono_literals;
float evaluate(TransitioningProperty<PropertyValue<float>>& property, Duration delta = Duration::zero()) {
+ ZoomHistory zoomHistory;
+ zoomHistory.update(0, TimePoint::min() + delta);
+
PropertyEvaluationParameters parameters {
- 0,
+ zoomHistory,
TimePoint::min() + delta,
- ZoomHistory(),
Duration::zero()
};
@@ -24,10 +26,12 @@ float evaluate(TransitioningProperty<PropertyValue<float>>& property, Duration d
}
PossiblyEvaluatedPropertyValue<float> evaluate(TransitioningProperty<DataDrivenPropertyValue<float>>& property, Duration delta = Duration::zero()) {
+ ZoomHistory zoomHistory;
+ zoomHistory.update(0, TimePoint::min() + delta);
+
PropertyEvaluationParameters parameters {
- 0,
+ zoomHistory,
TimePoint::min() + delta,
- ZoomHistory(),
Duration::zero()
};