diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-04-10 12:04:39 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-04-10 12:04:39 +0200 |
commit | 64b60b81d6c0e764310385f8f2f3ddd91f44513f (patch) | |
tree | e3eeebf06e43a3922de90d2fb1743a672a4ec541 | |
parent | 8389e746b6745a68fcd58ece8e398bde0a85b57f (diff) | |
download | qtlocation-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.mm | 5 | ||||
-rw-r--r-- | src/mbgl/gl/context.cpp | 2 |
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) |