Fix freezing on Android when rotating

Fixes #1941
This commit is contained in:
Leith Bade
2015-09-22 16:23:39 +10:00
parent da691dcbb5
commit d2d3df2a69
5 changed files with 13 additions and 9 deletions

View File

@@ -699,6 +699,11 @@ void NativeMapView::updateFps() {
void NativeMapView::onInvalidate() {
mbgl::Log::Debug(mbgl::Event::Android, "NativeMapView::onInvalidate()");
if (map.isPaused()) {
mbgl::Log::Debug(mbgl::Event::Android, "Not rendering as map is paused");
return;
}
const bool dirty = !clean.test_and_set();
if (dirty) {
float zoomFactor = map.getMaxZoom() - map.getMinZoom() + 1;