summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2019-04-10 12:04:39 +0200
committerKonstantin Käfer <mail@kkaefer.com>2019-04-10 12:04:39 +0200
commit64b60b81d6c0e764310385f8f2f3ddd91f44513f (patch)
treee3eeebf06e43a3922de90d2fb1743a672a4ec541
parent8389e746b6745a68fcd58ece8e398bde0a85b57f (diff)
downloadqtlocation-mapboxgl-upstream/ios-background.tar.gz
[ios] run glFlush when reducing memory and don't reduce memory while in backgroundupstream/ios-background
-rw-r--r--platform/ios/src/MGLMapView.mm5
-rw-r--r--src/mbgl/gl/context.cpp2
2 files changed, 6 insertions, 1 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 8bfd161cdb..49d22cc51c 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -835,7 +835,10 @@ public:
{
MGLAssertIsMainThread();
- _rendererFrontend->reduceMemoryUse();
+ if ( ! self.dormant)
+ {
+ _rendererFrontend->reduceMemoryUse();
+ }
}
#pragma mark - Layout -
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp
index e91c922a50..394f2cd0d7 100644
--- a/src/mbgl/gl/context.cpp
+++ b/src/mbgl/gl/context.cpp
@@ -812,6 +812,8 @@ void Context::performCleanup() {
abandonedRenderbuffers.data()));
abandonedRenderbuffers.clear();
}
+
+ MBGL_CHECK_ERROR(glFinish());
}
#if not defined(NDEBUG)