From: neostom432 Date: Mon, 15 Jun 2020 17:40:44 +0000 (+0900) Subject: Revert "[Tizen] Fix screen rotation bug when application is initialized." X-Git-Tag: accepted/tizen/unified/20200616.170907~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd63d3b6ebbd5f7789c47382d0e3610c06f61904;p=platform%2Fcore%2Fuifw%2Fdali-adaptor-legacy.git Revert "[Tizen] Fix screen rotation bug when application is initialized." This reverts commit 59826ecb77bb226fc0f40e3bfc35a43aff5b39b3. --- diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index ac3ccc1..5851ab2 100755 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -739,7 +739,6 @@ void Window::OnOutputTransformed() { forceUpdate = true; } - DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), OnOutputTransformed()\n", this, mNativeWindowId ); SurfaceResized( forceUpdate ); PositionSize positionSize = mSurface->GetPositionSize(); diff --git a/dali/internal/window-system/common/window-render-surface.cpp b/dali/internal/window-system/common/window-render-surface.cpp index dacb89e..8ecc906 100644 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -104,6 +104,14 @@ void WindowRenderSurface::Initialize( Any surface ) // Connect signals mWindowBase->OutputTransformedSignal().Connect( this, &WindowRenderSurface::OutputTransformed ); + + // Check screen rotation + mScreenRotationAngle = mWindowBase->GetScreenRotationAngle(); + if( mScreenRotationAngle != 0 ) + { + mScreenRotationFinished = false; + mResizeFinished = false; + } } Any WindowRenderSurface::GetNativeWindow() @@ -214,8 +222,20 @@ 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( mPositionSize.width, mPositionSize.height ); + EGLNativeWindowType window = mWindowBase->CreateEglWindow( width, height ); auto eglGraphics = static_cast(mGraphics); @@ -491,11 +511,11 @@ void WindowRenderSurface::OutputTransformed() mOutputTransformedSignal.Emit(); - DALI_LOG_RELEASE_INFO( "WindowRenderSurface::OutputTransformed: window = %d screen = %d\n", mRotationAngle, mScreenRotationAngle ); + DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::OutputTransformed: angle = %d screen rotation = %d\n", mRotationAngle, mScreenRotationAngle ); } else { - DALI_LOG_RELEASE_INFO( "WindowRenderSurface::OutputTransformed: Ignore output transform [%d]\n", mScreenRotationAngle ); + DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::OutputTransformed: Ignore output transform [%d]\n", mScreenRotationAngle ); } }