X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fgraphics%2Fgles%2Fegl-implementation.cpp;h=76fa78a62b542c5f900fd721a4c43f5ca985f18d;hb=0e542d2c071b28da232aa2827a18935a01592484;hp=91d4fab593e5c6aeeac9d19a3a7c35bcb4fa805a;hpb=28102d9e8a0757d088a1447b304a4bb8079df92f;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/graphics/gles/egl-implementation.cpp b/dali/internal/graphics/gles/egl-implementation.cpp index 91d4fab..76fa78a 100755 --- a/dali/internal/graphics/gles/egl-implementation.cpp +++ b/dali/internal/graphics/gles/egl-implementation.cpp @@ -401,7 +401,10 @@ 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 ) + // Ensure number of configs is set to 1 as on some drivers, + // eglChooseConfig succeeds but does not actually create a proper configuration. + if ( ( eglChooseConfig( mEglDisplay, &(configAttribs[0]), &mEglConfig, 1, &numConfigs ) != EGL_TRUE ) || + ( numConfigs != 1 ) ) { if( mGlesVersion >= 30 ) { @@ -410,6 +413,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 +470,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; } @@ -516,10 +519,10 @@ bool EglImplementation::ReplaceSurfaceWindow( EGLNativeWindowType window, EGLSur DestroySurface( eglSurface ); // create the EGL surface - CreateSurfaceWindow( window, mColorDepth ); + EGLSurface newEglSurface = CreateSurfaceWindow( window, mColorDepth ); // set the context to be current with the new surface - MakeContextCurrent( eglSurface, eglContext ); + MakeContextCurrent( newEglSurface, eglContext ); return contextLost; }