[Tizen]Fallback to GLES 2.0 when num_config is 0
authorSeungho, Baek <sbsh.baek@samsung.com>
Tue, 14 May 2019 07:31:02 +0000 (16:31 +0900)
committerSeungho, Baek <sbsh.baek@samsung.com>
Tue, 14 May 2019 07:31:05 +0000 (16:31 +0900)
This reverts commit 28102d9e8a0757d088a1447b304a4bb8079df92f.

dali/internal/graphics/gles/egl-implementation.cpp

index 91d4fab..7147bfe 100755 (executable)
@@ -400,8 +400,8 @@ bool EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
   }
 #endif // DALI_PROFILE_UBUNTU
   configAttribs.PushBack( EGL_NONE );
-
-  if ( eglChooseConfig( mEglDisplay, &(configAttribs[0]), &mEglConfig, 1, &numConfigs ) != EGL_TRUE )
+  if ( ( eglChooseConfig( mEglDisplay, &(configAttribs[0]), &mEglConfig, 1, &numConfigs ) != EGL_TRUE ) ||
+       ( numConfigs != 1 ) )
   {
     if( mGlesVersion >= 30 )
     {
@@ -410,6 +410,13 @@ bool EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
       return false;
     }
 
+    if ( numConfigs != 1 )
+    {
+      DALI_LOG_ERROR("No configurations found.\n");
+
+      TEST_EGL_ERROR("eglChooseConfig");
+    }
+
     EGLint error = eglGetError();
     switch (error)
     {
@@ -460,13 +467,6 @@ bool EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
   }
   mContextAttribs.PushBack( EGL_NONE );
 
-  if ( numConfigs != 1 )
-  {
-    DALI_LOG_ERROR("No configurations found.\n");
-
-    TEST_EGL_ERROR("eglChooseConfig");
-  }
-
   return true;
 }