summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2015-07-20 21:19:36 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2015-07-20 21:59:13 +0300
commit784eb355122bb0e4a01dff29da88aa6a76e2b85b (patch)
tree166adbc25848cf66dce4d9b6c1ec683bad0ab755 /src
parentfad241f8cf5f84add544887a04d4ce1108031aa1 (diff)
downloadqtlocation-mapboxgl-784eb355122bb0e4a01dff29da88aa6a76e2b85b.tar.gz
Revert "Revert "split renderSync and transition nudging to allow client view syncing""
This reverts commit 263f9fad308873077b9287dd8aeab089fc415b10.
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/map.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index 0e58a2912d..d983a9c518 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -48,7 +48,7 @@ void Map::renderStill(StillImageCallback callback) {
FrameData{ view.getFramebufferSize() }, callback);
}
-void Map::renderSync() {
+bool Map::renderSync() {
if (renderState == RenderState::never) {
view.notifyMapChange(MapChangeWillStartRenderingMap);
}
@@ -69,9 +69,13 @@ void Map::renderSync() {
view.notifyMapChange(MapChangeDidFinishRenderingMapFullyRendered);
}
+ return result.needsRerender;
+}
+
+void Map::nudgeTransitions(bool forceRerender) {
if (transform->needsTransition()) {
update(Update(transform->updateTransitions(Clock::now())));
- } else if (result.needsRerender) {
+ } else if (forceRerender) {
update();
}
}