X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=adaptors%2Fcommon%2Fgl%2Fegl-implementation.cpp;h=7ca4366226921abaa0e8adb84fbaec7e3d84bf95;hb=3e0170db1aa381d3a26f0c2b54f924dfda2dccc8;hp=dd2a59efb6f75bb00bdc0de4fa15f3891c179b37;hpb=213ca111a6387cae0206f3a8cd6d9bb22e45c3d7;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/adaptors/common/gl/egl-implementation.cpp b/adaptors/common/gl/egl-implementation.cpp index dd2a59e..7ca4366 100644 --- a/adaptors/common/gl/egl-implementation.cpp +++ b/adaptors/common/gl/egl-implementation.cpp @@ -52,7 +52,7 @@ namespace Adaptor } \ } -EglImplementation::EglImplementation( unsigned int multiSamplingLevel ) +EglImplementation::EglImplementation( int multiSamplingLevel ) : mEglNativeDisplay(0), mEglNativeWindow(0), mCurrentEglNativePixmap(0), @@ -155,6 +155,8 @@ void EglImplementation::DestroySurface() { if(mIsOwnSurface && mCurrentEglSurface) { + // Make context null to prevent crash in driver side + MakeContextNull(); eglDestroySurface( mEglDisplay, mCurrentEglSurface ); mCurrentEglSurface = 0; } @@ -221,9 +223,7 @@ void EglImplementation::TerminateGles() { if ( mGlesInitialized ) { - // in latest Mali DDK (r2p3 ~ r3p0 in April, 2012), - // MakeContextNull should be called before eglDestroy surface - // to prevent crash in _mali_surface_destroy_callback + // Make context null to prevent crash in driver side MakeContextNull(); if(mIsOwnSurface && mCurrentEglSurface) @@ -334,10 +334,13 @@ void EglImplementation::ChooseConfig( bool isWindowType, ColorDepth depth ) configAttribs.PushBack( EGL_STENCIL_SIZE ); configAttribs.PushBack( 8 ); #ifndef DALI_PROFILE_UBUNTU - configAttribs.PushBack( EGL_SAMPLES ); - configAttribs.PushBack( mMultiSamplingLevel ); - configAttribs.PushBack( EGL_SAMPLE_BUFFERS ); - configAttribs.PushBack( 1 ); + if( mMultiSamplingLevel != EGL_DONT_CARE ) + { + configAttribs.PushBack( EGL_SAMPLES ); + configAttribs.PushBack( mMultiSamplingLevel ); + configAttribs.PushBack( EGL_SAMPLE_BUFFERS ); + configAttribs.PushBack( 1 ); + } #endif // DALI_PROFILE_UBUNTU configAttribs.PushBack( EGL_NONE );