From d4320916227a16590e4ba7eb71004eda4301e26f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Mon, 24 Mar 2014 14:11:34 +0100 Subject: 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 --- src/plugins/platforms/android/qandroidplatformintegration.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins') 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)); -- cgit v1.2.3