summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2016-11-30 15:34:40 +0200
committerJesse Bounds <jesse@rebounds.net>2016-12-13 12:56:08 -0800
commitb221b6c5fb8ed3360c74a38266b4321e94c10659 (patch)
treecf7fa5527630c43167ea24df88be3e03937ef7e7
parent2d52dd8c0f964715d44ac51ec2491f24a9c8cb5a (diff)
downloadqtlocation-mapboxgl-b221b6c5fb8ed3360c74a38266b4321e94c10659.tar.gz
[core] Swap order of Style::recalculate and Style::relayout
Style::relayout uses source.baseImpl->loaded, a flag which is updated by Style::recalculate. So recalculate first, then relayout.
-rw-r--r--src/mbgl/map/map.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index 868b748af4..1efc1c063a 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -246,10 +246,6 @@ void Map::Impl::update() {
annotationManager->updateData();
}
- if (updateFlags & Update::Layout) {
- style->relayout();
- }
-
if (updateFlags & Update::Classes) {
style->cascade(timePoint, mode);
}
@@ -258,6 +254,10 @@ void Map::Impl::update() {
style->recalculate(transform.getZoom(), timePoint, mode);
}
+ if (updateFlags & Update::Layout) {
+ style->relayout();
+ }
+
style::UpdateParameters parameters(pixelRatio,
debugOptions,
transform.getState(),