summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/gl/context.cpp')
-rw-r--r--src/mbgl/gl/context.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp
index 3e88624d4f..4d9c2055de 100644
--- a/src/mbgl/gl/context.cpp
+++ b/src/mbgl/gl/context.cpp
@@ -682,7 +682,13 @@ void Context::performCleanup() {
abandonedRenderbuffers.data()));
abandonedRenderbuffers.clear();
}
+}
+
+void Context::reduceMemoryUsage() {
+ performCleanup();
+ // Ensure that all pending actions are executed to ensure that they happen before the app goes
+ // to the background.
MBGL_CHECK_ERROR(glFinish());
}