diff options
author | Christian Strømme <christian.stromme@digia.com> | 2014-03-24 14:11:34 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-29 02:28:43 +0100 |
commit | d4320916227a16590e4ba7eb71004eda4301e26f (patch) | |
tree | 11e4cfdced7dc77ba1f2e1720061b22f685ab99a /src/plugins | |
parent | 0bd8cc831aac0ea19b97d1d1f9b590b719efefdc (diff) |
Android: eglBindAPI() won't return on certain devices.
On some devices eglBindAPI() will block forever if called before
eglInitialize().
Task-number: QTBUG-37635
Change-Id: Id27f37e3efcd2ff16e97e1f3381ac3ae8ae0ef33
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/android/qandroidplatformintegration.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformintegration.cpp b/src/plugins/platforms/android/qandroidplatformintegration.cpp index 6395f71398..7f0f40be0f 100644 --- a/src/plugins/platforms/android/qandroidplatformintegration.cpp +++ b/src/plugins/platforms/android/qandroidplatformintegration.cpp @@ -104,9 +104,6 @@ QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList ¶ m_androidPlatformNativeInterface = new QAndroidPlatformNativeInterface(); - if (!eglBindAPI(EGL_OPENGL_ES_API)) - qFatal("Could not bind GL_ES API"); - m_eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); if (m_eglDisplay == EGL_NO_DISPLAY) qFatal("Could not open egl display"); @@ -115,6 +112,9 @@ QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList ¶ if (!eglInitialize(m_eglDisplay, &major, &minor)) qFatal("Could not initialize egl display"); + if (!eglBindAPI(EGL_OPENGL_ES_API)) + qFatal("Could not bind GL_ES API"); + m_primaryScreen = new QAndroidPlatformScreen(); screenAdded(m_primaryScreen); m_primaryScreen->setPhysicalSize(QSize(m_defaultPhysicalSizeWidth, m_defaultPhysicalSizeHeight)); |