X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fcommon%2Fwindow-render-surface.cpp;h=8a066b00874b7e4b1d824a951c489a6eb144ae9b;hb=2954c0a2cc2efae61afd86822e63532d4dd8ae7d;hp=021843e2f5179915c6e4fcae2357da6e6f293f7c;hpb=fb301c1dd3260b09cf0fe34f01068e3dc20a0ca2;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 021843e..8a066b0 100644 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -139,13 +139,6 @@ void WindowRenderSurface::Initialize( Any surface ) // Connect signals mWindowBase->OutputTransformedSignal().Connect( this, &WindowRenderSurface::OutputTransformed ); - - // Check screen rotation - mScreenRotationAngle = mWindowBase->GetScreenRotationAngle(); - if( mScreenRotationAngle != 0 ) - { - mScreenRotationFinished = false; - } } Any WindowRenderSurface::GetNativeWindow() @@ -175,12 +168,6 @@ void WindowRenderSurface::SetTransparency( bool transparent ) void WindowRenderSurface::RequestRotation( int angle, int width, int height ) { - if( !mRotationSupported ) - { - DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::Rotate: Rotation is not supported!\n" ); - return; - } - if( !mRotationTrigger ) { mRotationTrigger = TriggerEventFactory::CreateTriggerEvent( MakeCallback( this, &WindowRenderSurface::ProcessRotationRequest ), TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER ); @@ -232,6 +219,11 @@ void WindowRenderSurface::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpi dpiVertical = mDpiVertical; } +int WindowRenderSurface::GetOrientation() const +{ + return mWindowBase->GetOrientation(); +} + void WindowRenderSurface::InitializeGraphics() { mGraphics = &mAdaptor->GetGraphicsInterface(); @@ -257,20 +249,8 @@ void WindowRenderSurface::CreateSurface() { DALI_LOG_TRACE_METHOD( gWindowRenderSurfaceLogFilter ); - int width, height; - if( mScreenRotationAngle == 0 || mScreenRotationAngle == 180 ) - { - width = mPositionSize.width; - height = mPositionSize.height; - } - else - { - width = mPositionSize.height; - height = mPositionSize.width; - } - // Create the EGL window - EGLNativeWindowType window = mWindowBase->CreateEglWindow( width, height ); + EGLNativeWindowType window = mWindowBase->CreateEglWindow( mPositionSize.width, mPositionSize.height ); auto eglGraphics = static_cast(mGraphics); @@ -457,11 +437,11 @@ bool WindowRenderSurface::PreRender( bool resizingSurface, const std::vectorSetEglWindowRotation( totalAngle ); mWindowBase->SetEglWindowBufferTransform( totalAngle ); @@ -478,9 +458,22 @@ bool WindowRenderSurface::PreRender( bool resizingSurface, const std::vectorResizeEglWindow( mPositionSize ); + Dali::PositionSize positionSize; + positionSize.x = mPositionSize.x; + positionSize.y = mPositionSize.y; + if( totalAngle == 0 || totalAngle == 180 ) + { + positionSize.width = mPositionSize.width; + positionSize.height = mPositionSize.height; + } + else + { + positionSize.width = mPositionSize.height; + positionSize.height = mPositionSize.width; + } + mWindowBase->ResizeEglWindow( positionSize ); mResizeFinished = true; DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::PreRender: Set resize\n" ); @@ -589,14 +582,15 @@ void WindowRenderSurface::OutputTransformed() { mScreenRotationAngle = screenRotationAngle; mScreenRotationFinished = false; + mResizeFinished = false; mOutputTransformedSignal.Emit(); - DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::OutputTransformed: angle = %d screen rotation = %d\n", mRotationAngle, mScreenRotationAngle ); + DALI_LOG_RELEASE_INFO( "WindowRenderSurface::OutputTransformed: window = %d screen = %d\n", mRotationAngle, mScreenRotationAngle ); } else { - DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::OutputTransformed: Ignore output transform [%d]\n", mScreenRotationAngle ); + DALI_LOG_RELEASE_INFO( "WindowRenderSurface::OutputTransformed: Ignore output transform [%d]\n", mScreenRotationAngle ); } }