From 1bd07b029396ccfebebefe92ec5e1b6841d5760c Mon Sep 17 00:00:00 2001 From: Saytgalin Alexander Date: Wed, 1 Apr 2015 13:50:16 +0600 Subject: Always release surfaces when application is suspended or hidden. It is needed to recreate surfaces and to redraw when application is resumed because on some devices when the application is suspended Android destroys the surfaces. Change-Id: I8934e94af038b4ecf116d93aea223ad040b0bff1 Task-number: QTBUG-45019 Reviewed-by: BogDan Vatra Reviewed-by: Sergey Galin --- src/plugins/platforms/android/qandroidplatformopenglwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/android/qandroidplatformopenglwindow.cpp') diff --git a/src/plugins/platforms/android/qandroidplatformopenglwindow.cpp b/src/plugins/platforms/android/qandroidplatformopenglwindow.cpp index 02ce082a65f..57d3bfaf22f 100644 --- a/src/plugins/platforms/android/qandroidplatformopenglwindow.cpp +++ b/src/plugins/platforms/android/qandroidplatformopenglwindow.cpp @@ -156,7 +156,7 @@ bool QAndroidPlatformOpenGLWindow::checkNativeSurface(EGLConfig config) void QAndroidPlatformOpenGLWindow::applicationStateChanged(Qt::ApplicationState state) { QAndroidPlatformWindow::applicationStateChanged(state); - if (state <= Qt::ApplicationHidden && QtAndroid::blockEventLoopsWhenSuspended()) { + if (state <= Qt::ApplicationHidden) { lockSurface(); if (m_nativeSurfaceId != -1) { QtAndroid::destroySurface(m_nativeSurfaceId); -- cgit v1.2.3