diff options
author | BogDan Vatra <bogdan@kde.org> | 2014-07-21 17:09:31 +0300 |
---|---|---|
committer | BogDan Vatra <bogdan@kde.org> | 2014-07-31 19:20:42 +0200 |
commit | 96f0ff4f28c92b529a4d79afa669917734ec1192 (patch) | |
tree | 24dc77e2e40010374cb4b190b849414f04815e99 /src/plugins/platforms/android/androidjnimain.cpp | |
parent | 734c1268269a71b16829d36179e4a090f76c785e (diff) |
Android: Release all windows when the application is suspended.
When an application is suspended on Android all its Gl surfaces
are destroyed and can't be used to render anymore, so we should
release them in order to give back to the system the memory used
by them.
[ChangeLog] [Android] Release all windows when the application is
suspended.
Task-number: QTBUG-29069
Change-Id: I038aaa2006da1f3188fccba943ec4ffb3e551cf0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/plugins/platforms/android/androidjnimain.cpp')
-rw-r--r-- | src/plugins/platforms/android/androidjnimain.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp index 4ee32d79c2..7b99b29132 100644 --- a/src/plugins/platforms/android/androidjnimain.cpp +++ b/src/plugins/platforms/android/androidjnimain.cpp @@ -418,6 +418,9 @@ namespace QtAndroid return; m_surfaces.remove(surfaceId); + if (m_surfaces.isEmpty()) + m_surfaceId = 1; + QJNIEnvironmentPrivate env; if (!env) return; |