X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fcommon%2Fwindow-impl.cpp;h=7d36ff0dd316a6575484aa15d9bef38cf2116f78;hb=a37586f11a29deb43055df859153282e26b54d10;hp=9c734f58dc770fe98b5bd92e9c3bc7aee9e51f56;hpb=54fd2fdd37c254eeb9764bd5ac4d8f63b43c042c;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 old mode 100644 new mode 100755 index 9c734f5..7d36ff0 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ #include // EXTERNAL HEADERS +#include #include #include #include @@ -31,6 +32,7 @@ // INTERNAL HEADERS #include +#include #include #include #include @@ -86,13 +88,13 @@ Window::Window() mWindowHeight( 0 ), mOrientationMode( Internal::Adaptor::Window::OrientationMode::PORTRAIT ), mNativeWindowId( -1 ), - mFocusChangedSignal(), mResizedSignal(), mDeleteRequestSignal(), mFocusChangeSignal(), mResizeSignal(), mVisibilityChangedSignal(), - mTransitionEffectEventSignal() + mTransitionEffectEventSignal(), + mKeyboardRepeatSettingsChangedSignal() { } @@ -119,6 +121,7 @@ void Window::Initialize(Any surface, const PositionSize& positionSize, const std mWindowBase->FocusChangedSignal().Connect( this, &Window::OnFocusChanged ); mWindowBase->DeleteRequestSignal().Connect( this, &Window::OnDeleteRequest ); mWindowBase->TransitionEffectEventSignal().Connect( this, &Window::OnTransitionEffectEvent ); + mWindowBase->KeyboardRepeatSettingsChangedSignal().Connect( this, &Window::OnKeyboardRepeatSettingsChanged ); mWindowSurface->OutputTransformedSignal().Connect( this, &Window::OnOutputTransformed ); @@ -160,18 +163,6 @@ void Window::OnSurfaceSet( Dali::RenderSurfaceInterface* surface ) mWindowSurface = static_cast( surface ); } -void Window::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode ) -{ -} - -void Window::SetIndicatorBgOpacity( Dali::Window::IndicatorBgOpacity opacityMode ) -{ -} - -void Window::RotateIndicator( Dali::Window::WindowOrientation orientation ) -{ -} - void Window::SetClass( std::string name, std::string className ) { mName = name; @@ -187,18 +178,42 @@ std::string Window::GetClassName() const void Window::Raise() { mWindowBase->Raise(); + + GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); + EglGraphics* eglGraphics = static_cast(&graphics); + if (eglGraphics) + { + eglGraphics->SetFullSwapNextFrame(); + } + DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Raise() \n", this, mNativeWindowId ); } void Window::Lower() { mWindowBase->Lower(); + + GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); + EglGraphics* eglGraphics = static_cast(&graphics); + if (eglGraphics) + { + eglGraphics->SetFullSwapNextFrame(); + } + DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Lower() \n", this, mNativeWindowId ); } void Window::Activate() { mWindowBase->Activate(); + + GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); + EglGraphics* eglGraphics = static_cast(&graphics); + if (eglGraphics) + { + eglGraphics->SetFullSwapNextFrame(); + } + DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Activate() \n", this, mNativeWindowId ); } @@ -411,6 +426,13 @@ void Window::Show() mVisibilityChangedSignal.Emit( handle, true ); } + GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); + EglGraphics* eglGraphics = static_cast(&graphics); + if (eglGraphics) + { + eglGraphics->SetFullSwapNextFrame(); + } + DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Show(): iconified = %d, visible = %d\n", this, mNativeWindowId, mIconified, mVisible ); } @@ -429,6 +451,14 @@ 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 ); } @@ -477,6 +507,13 @@ 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 ); } @@ -576,7 +613,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 ); @@ -588,6 +631,13 @@ 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(); + } } Dali::Window::WindowSize Window::GetSize() const @@ -608,6 +658,13 @@ void Window::SetPosition( Dali::Window::WindowPosition position ) PositionSize oldRect = mSurface->GetPositionSize(); mWindowSurface->MoveResize( PositionSize( position.GetX(), position.GetY(), oldRect.width, oldRect.height ) ); + + GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); + EglGraphics* eglGraphics = static_cast(&graphics); + if (eglGraphics) + { + eglGraphics->SetFullSwapNextFrame(); + } } Dali::Window::WindowPosition Window::GetPosition() const @@ -636,7 +693,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 ); @@ -646,6 +709,13 @@ void Window::SetPositionSize( PositionSize positionSize ) mResizeSignal.Emit( handle, newSize ); mAdaptor->SurfaceResizeComplete( mSurface.get(), newSize ); } + + GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); + EglGraphics* eglGraphics = static_cast(&graphics); + if (eglGraphics) + { + eglGraphics->SetFullSwapNextFrame(); + } } Dali::Layer Window::GetRootLayer() const @@ -710,19 +780,39 @@ 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(); + } } void Window::OnFocusChanged( bool focusIn ) { Dali::Window handle( this ); - mFocusChangedSignal.Emit( focusIn ); mFocusChangeSignal.Emit( handle, focusIn ); + + GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); + EglGraphics* eglGraphics = static_cast(&graphics); + if (eglGraphics) + { + eglGraphics->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 ) ); } @@ -738,6 +828,12 @@ void Window::OnTransitionEffectEvent( DevelWindow::EffectState state, DevelWindo mTransitionEffectEventSignal.Emit( handle, state, type ); } +void Window::OnKeyboardRepeatSettingsChanged() +{ + Dali::Window handle( this ); + mKeyboardRepeatSettingsChangedSignal.Emit(); +} + void Window::OnTouchPoint( Dali::Integration::Point& point, int timeStamp ) { FeedTouchPoint( point, timeStamp ); @@ -764,7 +860,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 ) ); @@ -783,6 +885,13 @@ void Window::OnPause() { mEventHandler->Pause(); } + + GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); + EglGraphics* eglGraphics = static_cast(&graphics); + if (eglGraphics) + { + eglGraphics->SetFullSwapNextFrame(); + } } void Window::OnResume() @@ -791,6 +900,13 @@ void Window::OnResume() { mEventHandler->Resume(); } + + GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); + EglGraphics* eglGraphics = static_cast(&graphics); + if (eglGraphics) + { + eglGraphics->SetFullSwapNextFrame(); + } } void Window::RecalculateTouchPosition( Integration::Point& point ) @@ -909,6 +1025,21 @@ void Window::SetAvailableOrientations( const Dali::VectorGetNativeWindowId(); +} + +void Window::SetDamagedAreas(std::vector>& areas) +{ + GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface(); + EglGraphics* eglGraphics = static_cast(&graphics); + if (eglGraphics) + { + eglGraphics->SetDamagedAreas(areas); + } +} + } // Adaptor } // Internal