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:
@@ -761,7 +761,7 @@ void NativeMapView::updateFps() {
|
||||
env = nullptr;
|
||||
}
|
||||
|
||||
void NativeMapView::onInvalidate(bool inProgress) {
|
||||
void NativeMapView::onInvalidate() {
|
||||
mbgl::Log::Debug(mbgl::Event::Android, "NativeMapView::onInvalidate()");
|
||||
|
||||
const bool dirty = !clean.test_and_set();
|
||||
@@ -776,10 +776,8 @@ void NativeMapView::onInvalidate(bool inProgress) {
|
||||
|
||||
map.setSourceTileCacheSize(cacheSize);
|
||||
|
||||
const bool needsRerender = map.renderSync();
|
||||
if (!inProgress) {
|
||||
map.nudgeTransitions(needsRerender);
|
||||
}
|
||||
map.renderSync();
|
||||
map.nudgeTransitions();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user