Map::nudgeTransitions no longer depends on client information
Clients no longer need to provide data (eg. if gesturing or in a custom animation) to Map::nudgeTransitions(). Upon MapContext::renderSync(), a new atomic bool 'needsRepaint' in MapData allows thread-safe communication between Map and MapContext.
This commit is contained in:
@@ -336,11 +336,8 @@ void GLFWView::run() {
|
||||
glfwWaitEvents();
|
||||
const bool dirty = !clean.test_and_set();
|
||||
if (dirty) {
|
||||
const bool needsRerender = map->renderSync();
|
||||
GLFWView *view = reinterpret_cast<GLFWView *>(glfwGetWindowUserPointer(window));
|
||||
if (!view->tracking || !view->rotating) {
|
||||
map->nudgeTransitions(needsRerender);
|
||||
}
|
||||
map->renderSync();
|
||||
map->nudgeTransitions();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user