X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fcommon%2Fwindow-render-surface.cpp;h=e1a344f6c2bb36b301a51f7da64bc34005c2ce10;hb=aecc2d4c642e0cdf360e56accd3e5b96622a707f;hp=49050689a09c8278d5e56e08c654cebe37dfb3f5;hpb=eaab2252cdd6446f233b55e0020de362a61b3c01;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/common/window-render-surface.cpp b/dali/internal/window-system/common/window-render-surface.cpp index 4905068..e1a344f 100644 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ // INTERNAL INCLUDES #include -#include +#include #include #include #include @@ -153,8 +153,7 @@ void WindowRenderSurface::RequestRotation( int angle, int width, int height ) if( !mRotationTrigger ) { - TriggerEventFactoryInterface& triggerFactory = Internal::Adaptor::Adaptor::GetImplementation( Adaptor::Get() ).GetTriggerEventFactoryInterface(); - mRotationTrigger = triggerFactory.CreateTriggerEvent( MakeCallback( this, &WindowRenderSurface::ProcessRotationRequest ), TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER ); + mRotationTrigger = TriggerEventFactory::CreateTriggerEvent( MakeCallback( this, &WindowRenderSurface::ProcessRotationRequest ), TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER ); } mPositionSize.width = width; @@ -205,9 +204,10 @@ void WindowRenderSurface::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpi void WindowRenderSurface::InitializeGraphics() { - mGraphics = &mAdaptor->GetGraphicsInterface(); + DALI_ASSERT_ALWAYS( mGraphics && "Graphics interface is not created" ); + auto eglGraphics = static_cast(mGraphics); mEGL = &eglGraphics->GetEglInterface(); @@ -250,8 +250,8 @@ void WindowRenderSurface::CreateSurface() // Check rotation capability mRotationSupported = mWindowBase->IsEglWindowRotationSupported(); - DALI_LOG_RELEASE_INFO("WindowRenderSurface::CreateSurface: w = %d h = %d angle = %d screen rotation = %d\n", - mPositionSize.width, mPositionSize.height, mRotationAngle, mScreenRotationAngle ); + DALI_LOG_RELEASE_INFO("WindowRenderSurface::CreateSurface: WinId (%d), w = %d h = %d angle = %d screen rotation = %d\n", + mWindowBase->GetNativeWindowId(), mPositionSize.width, mPositionSize.height, mRotationAngle, mScreenRotationAngle ); } void WindowRenderSurface::DestroySurface() @@ -259,11 +259,15 @@ void WindowRenderSurface::DestroySurface() DALI_LOG_TRACE_METHOD( gWindowRenderSurfaceLogFilter ); auto eglGraphics = static_cast(mGraphics); + if( eglGraphics ) + { + DALI_LOG_RELEASE_INFO("WindowRenderSurface::DestroySurface: WinId (%d)\n", mWindowBase->GetNativeWindowId() ); - Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation(); - eglImpl.DestroySurface( mEGLSurface ); + Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation(); + eglImpl.DestroySurface( mEGLSurface ); - mWindowBase->DestroyEglWindow(); + mWindowBase->DestroyEglWindow(); + } } bool WindowRenderSurface::ReplaceGraphicsSurface() @@ -413,7 +417,13 @@ void WindowRenderSurface::PostRender( bool renderToFbo, bool replacingSurface, b { if( !mRotationFinished ) { - DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::PostRender: Trigger rotation event\n" ); + if( mThreadSynchronization ) + { + // Enable PostRender flag + mThreadSynchronization->PostRenderStarted(); + } + + DALI_LOG_RELEASE_INFO("WindowRenderSurface::PostRender: Trigger rotation event\n" ); mRotationTrigger->Trigger(); @@ -452,9 +462,9 @@ void WindowRenderSurface::ReleaseLock() // Nothing to do. } -Integration::RenderSurface::Type WindowRenderSurface::GetSurfaceType() +Dali::RenderSurfaceInterface::Type WindowRenderSurface::GetSurfaceType() { - return RenderSurface::WINDOW_RENDER_SURFACE; + return Dali::RenderSurfaceInterface::WINDOW_RENDER_SURFACE; } void WindowRenderSurface::MakeContextCurrent()