EGL: Ignore EGL_ALPHA_SIZE = 8 in eglChooseConfig on desktop environment
authorJavon Prince <javon.prince@samsung.com>
Wed, 30 Apr 2014 11:06:42 +0000 (12:06 +0100)
committerPaul Wisbey <p.wisbey@samsung.com>
Fri, 9 May 2014 15:32:50 +0000 (16:32 +0100)
Change-Id: I62e4fb28ac285796f25492036b18ad843b29e8b9
Signed-off-by: Javon Prince <javon.prince@samsung.com>
adaptors/tizen/internal/common/gl/egl-implementation.cpp

index 08ea55e..65cfb6e 100644 (file)
@@ -372,16 +372,14 @@ void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth )
   configAttribs.PushBack( EGL_BLUE_SIZE );
   configAttribs.PushBack( 8 );
 
-  if(depth == COLOR_DEPTH_32)
-  {
-    configAttribs.PushBack( EGL_ALPHA_SIZE );
-    configAttribs.PushBack( 8 );
-  }
-  else
-  {
-    configAttribs.PushBack( EGL_ALPHA_SIZE );
-    configAttribs.PushBack( 0 );
-  }
+  configAttribs.PushBack( EGL_ALPHA_SIZE );
+#ifdef _ARCH_ARM_
+  configAttribs.PushBack( (depth == COLOR_DEPTH_32) ? 8 : 0 );
+#else
+  // There is a bug in the desktop emulator
+  // setting EGL_ALPHA_SIZE to 8 results in eglChooseConfig failing
+  configAttribs.PushBack( 0 );
+#endif // _ARCH_ARM_
 
   configAttribs.PushBack( EGL_DEPTH_SIZE );
   configAttribs.PushBack( 24 );