From: Daekwang Ryu Date: Tue, 15 Sep 2020 07:36:14 +0000 (+0900) Subject: Revert "[Tizen] Apply screen rotation to create window" X-Git-Tag: accepted/tizen/unified/20200917.030643~14 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=commitdiff_plain;h=2277fd044b6cc8daf635f6ef439169c6c2e7baff Revert "[Tizen] Apply screen rotation to create window" This reverts commit 9b0f8e53996dedb9b712db1cc6502a205ff3d733. --- diff --git a/dali/integration-api/adaptor-framework/scene-holder-impl.cpp b/dali/integration-api/adaptor-framework/scene-holder-impl.cpp index 09f8a2b..66da5db 100644 --- a/dali/integration-api/adaptor-framework/scene-holder-impl.cpp +++ b/dali/integration-api/adaptor-framework/scene-holder-impl.cpp @@ -262,8 +262,7 @@ void SceneHolder::SetAdaptor(Dali::Adaptor& adaptor) // Create the scene PositionSize surfacePositionSize = mSurface->GetPositionSize(); - int orientation = mSurface->GetOrientation(); - mScene = Dali::Integration::Scene::New( Size(static_cast( surfacePositionSize.width ), static_cast( surfacePositionSize.height )), orientation ); + mScene = Dali::Integration::Scene::New( Size(static_cast( surfacePositionSize.width ), static_cast( surfacePositionSize.height )) ); Internal::Adaptor::Adaptor& adaptorImpl = Internal::Adaptor::Adaptor::GetImplementation( adaptor ); mAdaptor = &adaptorImpl; diff --git a/dali/internal/window-system/common/window-render-surface.cpp b/dali/internal/window-system/common/window-render-surface.cpp index 9c65eb7..2ec42bf 100644 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -75,7 +75,6 @@ WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize, Any s mRotationFinished( true ), mScreenRotationFinished( true ), mResizeFinished( true ), - mDefaultScreenRotationAvailable( false ), mDpiHorizontal( 0 ), mDpiVertical( 0 ) { @@ -108,16 +107,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; - mResizeFinished = false; - mDefaultScreenRotationAvailable = true; - DALI_LOG_RELEASE_INFO("WindowRenderSurface::Initialize, screen rotation is enabled, screen rotation angle:[%d]\n", mScreenRotationAngle ); - } } Any WindowRenderSurface::GetNativeWindow() @@ -228,20 +217,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); @@ -428,7 +405,7 @@ bool WindowRenderSurface::PreRender( bool resizingSurface, const std::vector(mGraphics); - if( resizingSurface || mDefaultScreenRotationAvailable ) + if( resizingSurface ) { int totalAngle = (mRotationAngle + mScreenRotationAngle) % 360; @@ -441,7 +418,7 @@ bool WindowRenderSurface::PreRender( bool resizingSurface, const std::vectorResizeEglWindow( positionSize ); mResizeFinished = true; - DALI_LOG_RELEASE_INFO( "WindowRenderSurface::PreRender: Set resize\n" ); + DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::PreRender: Set resize\n" ); } if (eglGraphics) @@ -477,7 +454,6 @@ bool WindowRenderSurface::PreRender( bool resizingSurface, const std::vectorGetEglImplementation(); eglImpl.SetFullSwapNextFrame(); } - mDefaultScreenRotationAvailable = false; } if (eglGraphics) diff --git a/dali/internal/window-system/common/window-render-surface.h b/dali/internal/window-system/common/window-render-surface.h index 3a715862..b1ef6d9 100644 --- a/dali/internal/window-system/common/window-render-surface.h +++ b/dali/internal/window-system/common/window-render-surface.h @@ -299,7 +299,6 @@ private: // Data bool mRotationFinished; bool mScreenRotationFinished; bool mResizeFinished; - bool mDefaultScreenRotationAvailable; uint32_t mDpiHorizontal; uint32_t mDpiVertical;