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/qandroidplatformopenglcontext.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/qandroidplatformopenglcontext.cpp')
-rw-r--r-- | src/plugins/platforms/android/qandroidplatformopenglcontext.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp index f27bea8863..2c6e8370ce 100644 --- a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp +++ b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp @@ -58,10 +58,10 @@ QAndroidPlatformOpenGLContext::QAndroidPlatformOpenGLContext(const QSurfaceForma void QAndroidPlatformOpenGLContext::swapBuffers(QPlatformSurface *surface) { - QEGLPlatformContext::swapBuffers(surface); - if (surface->surface()->surfaceClass() == QSurface::Window) static_cast<QAndroidPlatformOpenGLWindow *>(surface)->checkNativeSurface(eglConfig()); + + QEGLPlatformContext::swapBuffers(surface); } bool QAndroidPlatformOpenGLContext::needsFBOReadBackWorkaroud() |