X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fcommon%2Fwindow-impl.cpp;h=a2141445e78c9ecd38a9f77fc02f862ee81fa530;hb=de46e23491f796ece28af29f4cd7906160a313bf;hp=1e287a0792de0b5448c9bcf2970b8eb343a9387b;hpb=547fa1a243344c31153f7d118cf1453b3541f9e7;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index 1e287a0..a214144 100755 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -121,6 +121,7 @@ void Window::Initialize(Any surface, const PositionSize& positionSize, const std mWindowBase->DeleteRequestSignal().Connect( this, &Window::OnDeleteRequest ); mWindowBase->TransitionEffectEventSignal().Connect( this, &Window::OnTransitionEffectEvent ); mWindowBase->KeyboardRepeatSettingsChangedSignal().Connect( this, &Window::OnKeyboardRepeatSettingsChanged ); + mWindowBase->WindowRedrawRequestSignal().Connect( this, &Window::OnWindowRedrawRequest ); mWindowSurface->OutputTransformedSignal().Connect( this, &Window::OnOutputTransformed ); @@ -178,12 +179,7 @@ void Window::Raise() { mWindowBase->Raise(); - GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); - EglGraphics* eglGraphics = static_cast(&graphics); - if (eglGraphics) - { - eglGraphics->SetFullSwapNextFrame(); - } + mSurface->SetFullSwapNextFrame(); DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Raise() \n", this, mNativeWindowId ); } @@ -192,12 +188,7 @@ void Window::Lower() { mWindowBase->Lower(); - GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); - EglGraphics* eglGraphics = static_cast(&graphics); - if (eglGraphics) - { - eglGraphics->SetFullSwapNextFrame(); - } + mSurface->SetFullSwapNextFrame(); DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Lower() \n", this, mNativeWindowId ); } @@ -206,12 +197,7 @@ void Window::Activate() { mWindowBase->Activate(); - GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); - EglGraphics* eglGraphics = static_cast(&graphics); - if (eglGraphics) - { - eglGraphics->SetFullSwapNextFrame(); - } + mSurface->SetFullSwapNextFrame(); DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Activate() \n", this, mNativeWindowId ); } @@ -425,12 +411,7 @@ void Window::Show() mVisibilityChangedSignal.Emit( handle, true ); } - GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); - EglGraphics* eglGraphics = static_cast(&graphics); - if (eglGraphics) - { - eglGraphics->SetFullSwapNextFrame(); - } + mSurface->SetFullSwapNextFrame(); DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Show(): iconified = %d, visible = %d\n", this, mNativeWindowId, mIconified, mVisible ); } @@ -450,14 +431,6 @@ void Window::Hide() mVisibilityChangedSignal.Emit( handle, false ); } - - GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); - EglGraphics* eglGraphics = static_cast(&graphics); - if (eglGraphics) - { - eglGraphics->SetFullSwapNextFrame(); - } - DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Hide(): iconified = %d, visible = %d\n", this, mNativeWindowId, mIconified, mVisible ); } @@ -506,13 +479,6 @@ void Window::SetInputRegion( const Rect< int >& inputRegion ) { mWindowBase->SetInputRegion( inputRegion ); - GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); - EglGraphics* eglGraphics = static_cast(&graphics); - if (eglGraphics) - { - eglGraphics->SetFullSwapNextFrame(); - } - DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetInputRegion: x = %d, y = %d, w = %d, h = %d\n", inputRegion.x, inputRegion.y, inputRegion.width, inputRegion.height ); } @@ -612,7 +578,13 @@ void Window::SetSize( Dali::Window::WindowSize size ) { Uint16Pair newSize( newRect.width, newRect.height ); - SurfaceResized(); + bool forceUpdate = false; + if( mWindowBase->IsEglWindowRotationSupported() ) + { + forceUpdate = true; + } + + SurfaceResized( forceUpdate ); mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize ); @@ -624,12 +596,7 @@ void Window::SetSize( Dali::Window::WindowSize size ) mAdaptor->SurfaceResizeComplete( mSurface.get(), newSize ); } - GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); - EglGraphics* eglGraphics = static_cast(&graphics); - if (eglGraphics) - { - eglGraphics->SetFullSwapNextFrame(); - } + mSurface->SetFullSwapNextFrame(); } Dali::Window::WindowSize Window::GetSize() const @@ -651,12 +618,7 @@ void Window::SetPosition( Dali::Window::WindowPosition position ) mWindowSurface->MoveResize( PositionSize( position.GetX(), position.GetY(), oldRect.width, oldRect.height ) ); - GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); - EglGraphics* eglGraphics = static_cast(&graphics); - if (eglGraphics) - { - eglGraphics->SetFullSwapNextFrame(); - } + mSurface->SetFullSwapNextFrame(); } Dali::Window::WindowPosition Window::GetPosition() const @@ -685,7 +647,13 @@ void Window::SetPositionSize( PositionSize positionSize ) { Uint16Pair newSize( newRect.width, newRect.height ); - SurfaceResized(); + bool forceUpdate = false; + if( mWindowBase->IsEglWindowRotationSupported() ) + { + forceUpdate = true; + } + + SurfaceResized( forceUpdate ); mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize ); @@ -695,12 +663,7 @@ void Window::SetPositionSize( PositionSize positionSize ) mAdaptor->SurfaceResizeComplete( mSurface.get(), newSize ); } - GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); - EglGraphics* eglGraphics = static_cast(&graphics); - if (eglGraphics) - { - eglGraphics->SetFullSwapNextFrame(); - } + mSurface->SetFullSwapNextFrame(); } Dali::Layer Window::GetRootLayer() const @@ -766,12 +729,7 @@ void Window::OnIconifyChanged( bool iconified ) DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Deiconified: visible = %d\n", this, mNativeWindowId, mVisible ); } - GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); - EglGraphics* eglGraphics = static_cast(&graphics); - if (eglGraphics) - { - eglGraphics->SetFullSwapNextFrame(); - } + mSurface->SetFullSwapNextFrame(); } void Window::OnFocusChanged( bool focusIn ) @@ -779,18 +737,20 @@ void Window::OnFocusChanged( bool focusIn ) Dali::Window handle( this ); mFocusChangeSignal.Emit( handle, focusIn ); - GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); - EglGraphics* eglGraphics = static_cast(&graphics); - if (eglGraphics) - { - eglGraphics->SetFullSwapNextFrame(); - } + mSurface->SetFullSwapNextFrame(); } void Window::OnOutputTransformed() { + bool forceUpdate = false; + if( mWindowBase->IsEglWindowRotationSupported() ) + { + forceUpdate = true; + } + DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), OnOutputTransformed()\n", this, mNativeWindowId ); + SurfaceResized( forceUpdate ); + PositionSize positionSize = mSurface->GetPositionSize(); - SurfaceResized(); mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) ); mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) ); } @@ -812,6 +772,11 @@ void Window::OnKeyboardRepeatSettingsChanged() mKeyboardRepeatSettingsChangedSignal.Emit(); } +void Window::OnWindowRedrawRequest() +{ + mAdaptor->RenderOnce(); +} + void Window::OnTouchPoint( Dali::Integration::Point& point, int timeStamp ) { FeedTouchPoint( point, timeStamp ); @@ -838,7 +803,13 @@ void Window::OnRotation( const RotationEvent& rotation ) mWindowSurface->RequestRotation( mRotationAngle, mWindowWidth, mWindowHeight ); - SurfaceResized(); + bool forceUpdate = false; + if( mWindowBase->IsEglWindowRotationSupported() ) + { + forceUpdate = true; + } + + SurfaceResized( forceUpdate ); mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( mWindowWidth, mWindowHeight ) ); @@ -856,13 +827,6 @@ void Window::OnPause() { mEventHandler->Pause(); } - - GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); - EglGraphics* eglGraphics = static_cast(&graphics); - if (eglGraphics) - { - eglGraphics->SetFullSwapNextFrame(); - } } void Window::OnResume() @@ -872,12 +836,7 @@ void Window::OnResume() mEventHandler->Resume(); } - GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); - EglGraphics* eglGraphics = static_cast(&graphics); - if (eglGraphics) - { - eglGraphics->SetFullSwapNextFrame(); - } + mSurface->SetFullSwapNextFrame(); } void Window::RecalculateTouchPosition( Integration::Point& point ) @@ -1001,16 +960,6 @@ int32_t Window::GetNativeId() const return mWindowBase->GetNativeWindowId(); } -void Window::SetDamagedAreas(std::vector>& areas) -{ - GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); - EglGraphics* eglGraphics = static_cast(&graphics); - if (eglGraphics) - { - eglGraphics->SetDamagedAreas(areas); - } -} - } // Adaptor } // Internal