From 263f9fad308873077b9287dd8aeab089fc415b10 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Mon, 20 Jul 2015 16:57:35 +0300 Subject: [PATCH] Revert "split renderSync and transition nudging to allow client view syncing" This reverts commit b8388168dd130c67c77254565cdb576df7905915. It seems 'nudgeTransitions()' is no longer necessary as #1548 has fixed the update issues. --- include/mbgl/map/map.hpp | 5 +---- platform/ios/MGLMapView.mm | 4 +--- src/mbgl/map/map.cpp | 8 ++------ 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 82aef65b6..d31d6a275 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -67,10 +67,7 @@ public: void renderStill(StillImageCallback callback); // Triggers a synchronous or asynchronous render. - bool renderSync(); - - // Nudges transitions one step, possibly notifying of the need for a rerender. - void nudgeTransitions(bool forceRerender); + void renderSync(); // Notifies the Map thread that the state has changed and an update might be necessary. void update(Update update = Update::Nothing); diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index e807d21c6..6cb46e28a 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -703,11 +703,9 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) _mbglMap->setSourceTileCacheSize(cacheSize); - bool needsRerender = _mbglMap->renderSync(); + _mbglMap->renderSync(); [self updateUserLocationAnnotationView]; - - _mbglMap->nudgeTransitions(needsRerender); } } diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index d983a9c51..0e58a2912 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); } -bool Map::renderSync() { +void Map::renderSync() { if (renderState == RenderState::never) { view.notifyMapChange(MapChangeWillStartRenderingMap); } @@ -69,13 +69,9 @@ bool Map::renderSync() { view.notifyMapChange(MapChangeDidFinishRenderingMapFullyRendered); } - return result.needsRerender; -} - -void Map::nudgeTransitions(bool forceRerender) { if (transform->needsTransition()) { update(Update(transform->updateTransitions(Clock::now()))); - } else if (forceRerender) { + } else if (result.needsRerender) { update(); } }