X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fcommon%2Fwindow-render-surface.cpp;h=a5402f52c11b5fa44d06b8775ae7805991a22523;hb=8b1a81f1588e23f783ad1021aa11ffc7d33a86b4;hp=3a316f85466eb161acdacd5803c18ca81436f147;hpb=1f5c66d0dc2af7a70e44a92ffa1b2965ead59e57;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 3a316f8..a5402f5 100644 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -23,16 +23,16 @@ #include // INTERNAL INCLUDES -#include -#include -#include +#include +#include #include #include +#include +#include #include #include #include -#include - +#include namespace Dali { @@ -71,7 +71,9 @@ WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize, Any s mRotationSupported( false ), mRotationFinished( true ), mScreenRotationFinished( true ), - mResizeFinished( true ) + mResizeFinished( true ), + mDpiHorizontal( 0 ), + mDpiVertical( 0 ) { DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "Creating Window\n" ); Initialize( surface ); @@ -98,7 +100,6 @@ void WindowRenderSurface::Initialize( Any surface ) // Default window size == screen size mPositionSize.x = 0; mPositionSize.y = 0; - WindowSystem::GetScreenSize( mPositionSize.width, mPositionSize.height ); } @@ -184,7 +185,22 @@ PositionSize WindowRenderSurface::GetPositionSize() const void WindowRenderSurface::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) { - mWindowBase->GetDpi( dpiHorizontal, dpiVertical ); + if( mDpiHorizontal == 0 || mDpiVertical == 0 ) + { + const char* environmentDpiHorizontal = std::getenv( DALI_ENV_DPI_HORIZONTAL ); + mDpiHorizontal = environmentDpiHorizontal ? std::atoi( environmentDpiHorizontal ) : 0; + + const char* environmentDpiVertical = std::getenv( DALI_ENV_DPI_VERTICAL ); + mDpiVertical = environmentDpiVertical ? std::atoi( environmentDpiVertical ) : 0; + + if( mDpiHorizontal == 0 || mDpiVertical == 0 ) + { + mWindowBase->GetDpi( mDpiHorizontal, mDpiVertical ); + } + } + + dpiHorizontal = mDpiHorizontal; + dpiVertical = mDpiVertical; } void WindowRenderSurface::InitializeGraphics() @@ -234,10 +250,8 @@ void WindowRenderSurface::CreateSurface() // Check rotation capability mRotationSupported = mWindowBase->IsEglWindowRotationSupported(); - int screenWidth, screenHeight; - WindowSystem::GetScreenSize( screenWidth, screenHeight ); - DALI_LOG_RELEASE_INFO("WindowRenderSurface::CreateSurface: w = %d h = %d screenWidth = %d screenHeight = %d angle = %d screen rotation = %d\n", - mPositionSize.width, mPositionSize.height, screenWidth, screenHeight, 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() @@ -246,6 +260,8 @@ void WindowRenderSurface::DestroySurface() auto eglGraphics = static_cast(mGraphics); + DALI_LOG_RELEASE_INFO("WindowRenderSurface::DestroySurface: WinId (%d)\n", mWindowBase->GetNativeWindowId() ); + Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation(); eglImpl.DestroySurface( mEGLSurface ); @@ -399,7 +415,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();