diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2015-07-20 21:19:36 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2015-07-20 21:59:13 +0300 |
commit | 784eb355122bb0e4a01dff29da88aa6a76e2b85b (patch) | |
tree | 166adbc25848cf66dce4d9b6c1ec683bad0ab755 /src | |
parent | fad241f8cf5f84add544887a04d4ce1108031aa1 (diff) | |
download | qtlocation-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.cpp | 8 |
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(); } } |