X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fcommon%2Fwindow-render-surface.cpp;h=8bb94c526fe6c180c05035b228eda9346d0898e1;hb=05f371f0329cf6cf10409e74770b0a875bf49a1b;hp=f9eb552deb52e292954eda35c941efcf883a3733;hpb=c6d1a04c06e9e97fe5486934e2705549c6643a86;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 f9eb552..8bb94c5 100644 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -32,6 +32,7 @@ #include #include #include +#include namespace Dali @@ -71,7 +72,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 ); @@ -184,7 +187,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,7 +252,10 @@ void WindowRenderSurface::CreateSurface() // Check rotation capability mRotationSupported = mWindowBase->IsEglWindowRotationSupported(); - DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::CreateSurface: w = %d h = %d angle = %d screen rotation = %d\n", mPositionSize.width, mPositionSize.height, mRotationAngle, mScreenRotationAngle ); + 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 ); } void WindowRenderSurface::DestroySurface() @@ -416,12 +437,6 @@ void WindowRenderSurface::PostRender( bool renderToFbo, bool replacingSurface, b { mRenderNotification->Trigger(); } - - if ( eglImpl.IsSurfacelessContextSupported() ) - { - // Switch to the shared context after rendering this surface - eglImpl.MakeContextCurrent( EGL_NO_SURFACE, eglImpl.GetContext() ); - } } }