diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-06-12 17:25:44 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-06-12 18:08:18 +0200 |
commit | ce91218b420cd9e57a3367679300f8ba4027d6c5 (patch) | |
tree | ce4298d2f35793bf788d3834b07f63c611846641 /src/mbgl/gl/context.cpp | |
parent | d37212421955bb144f67905fbd1e7321a74b465b (diff) | |
download | qtlocation-mapboxgl-ce91218b420cd9e57a3367679300f8ba4027d6c5.tar.gz |
[core] don't call glFlush on every frame
Diffstat (limited to 'src/mbgl/gl/context.cpp')
-rw-r--r-- | src/mbgl/gl/context.cpp | 6 |
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()); } |