From 64b60b81d6c0e764310385f8f2f3ddd91f44513f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Wed, 10 Apr 2019 12:04:39 +0200 Subject: [ios] run glFlush when reducing memory and don't reduce memory while in background --- platform/ios/src/MGLMapView.mm | 5 ++++- src/mbgl/gl/context.cpp | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) 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) -- cgit v1.2.1