X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=adaptors%2Fwayland%2Fwindow-render-surface-wl.cpp;h=77657e73f0360bd22169f17d39825fbce6625c63;hb=18e20762d22e38c4e6ddffa9cfd53e1b14ce3c2c;hp=38a2d4406dba72b310291ae6e9f24ad6fd7dfadd;hpb=d94dd871a0082764cd8f4cbd7c5d82d93bd57f51;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/adaptors/wayland/window-render-surface-wl.cpp b/adaptors/wayland/window-render-surface-wl.cpp index 38a2d44..77657e7 100644 --- a/adaptors/wayland/window-render-surface-wl.cpp +++ b/adaptors/wayland/window-render-surface-wl.cpp @@ -50,7 +50,8 @@ WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize, const std::string& name, bool isTransparent) : EcoreWlRenderSurface( positionSize, surface, name, isTransparent ), - mNeedToApproveDeiconify(false) + mEglWindow( NULL ), + mNeedToApproveDeiconify( false ) { DALI_LOG_INFO( gRenderSurfaceLogFilter, Debug::Verbose, "Creating Window\n" ); Init( surface ); @@ -58,6 +59,12 @@ WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize, WindowRenderSurface::~WindowRenderSurface() { + if( mEglWindow != NULL ) + { + wl_egl_window_destroy(mEglWindow); + mEglWindow = NULL; + } + if( mOwnSurface ) { ecore_wl_window_free( mWlWindow ); @@ -113,15 +120,18 @@ void WindowRenderSurface::DestroyEglSurface( EglInterface& eglIf ) Internal::Adaptor::EglImplementation& eglImpl = static_cast( eglIf ); eglImpl.DestroySurface(); - wl_egl_window_destroy(mEglWindow); - mEglWindow = NULL; } bool WindowRenderSurface::ReplaceEGLSurface( EglInterface& egl ) { DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter ); - wl_egl_window_destroy(mEglWindow); + if( mEglWindow != NULL ) + { + wl_egl_window_destroy(mEglWindow); + mEglWindow = NULL; + } + mEglWindow = wl_egl_window_create(ecore_wl_window_surface_get(mWlWindow), mPosition.width, mPosition.height); Internal::Adaptor::EglImplementation& eglImpl = static_cast( egl );