projects
/
platform
/
core
/
uifw
/
dali-adaptor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Tizen] Add screen and client rotation itself function
[platform/core/uifw/dali-adaptor.git]
/
dali
/
internal
/
window-system
/
common
/
window-impl.cpp
diff --git
a/dali/internal/window-system/common/window-impl.cpp
b/dali/internal/window-system/common/window-impl.cpp
index
b21ca77
..
1664ed3
100755
(executable)
--- a/
dali/internal/window-system/common/window-impl.cpp
+++ b/
dali/internal/window-system/common/window-impl.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 20
19
Samsung Electronics Co., Ltd.
+ * Copyright (c) 20
20
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-32,6
+32,7
@@
// INTERNAL HEADERS
#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
// INTERNAL HEADERS
#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
#include <dali/internal/window-system/common/event-handler.h>
#include <dali/internal/window-system/common/orientation-impl.h>
#include <dali/internal/window-system/common/render-surface-factory.h>
#include <dali/internal/window-system/common/event-handler.h>
#include <dali/internal/window-system/common/orientation-impl.h>
#include <dali/internal/window-system/common/render-surface-factory.h>
@@
-87,7
+88,6
@@
Window::Window()
mWindowHeight( 0 ),
mOrientationMode( Internal::Adaptor::Window::OrientationMode::PORTRAIT ),
mNativeWindowId( -1 ),
mWindowHeight( 0 ),
mOrientationMode( Internal::Adaptor::Window::OrientationMode::PORTRAIT ),
mNativeWindowId( -1 ),
- mFocusChangedSignal(),
mResizedSignal(),
mDeleteRequestSignal(),
mFocusChangeSignal(),
mResizedSignal(),
mDeleteRequestSignal(),
mFocusChangeSignal(),
@@
-161,18
+161,6
@@
void Window::OnSurfaceSet( Dali::RenderSurfaceInterface* surface )
mWindowSurface = static_cast<WindowRenderSurface*>( surface );
}
mWindowSurface = static_cast<WindowRenderSurface*>( 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;
void Window::SetClass( std::string name, std::string className )
{
mName = name;
@@
-188,18
+176,42
@@
std::string Window::GetClassName() const
void Window::Raise()
{
mWindowBase->Raise();
void Window::Raise()
{
mWindowBase->Raise();
+
+ GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface();
+ EglGraphics* eglGraphics = static_cast<EglGraphics*>(&graphics);
+ if (eglGraphics)
+ {
+ eglGraphics->SetFullSwapNextFrame();
+ }
+
DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Raise() \n", this, mNativeWindowId );
}
void Window::Lower()
{
mWindowBase->Lower();
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<EglGraphics*>(&graphics);
+ if (eglGraphics)
+ {
+ eglGraphics->SetFullSwapNextFrame();
+ }
+
DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Lower() \n", this, mNativeWindowId );
}
void Window::Activate()
{
mWindowBase->Activate();
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<EglGraphics*>(&graphics);
+ if (eglGraphics)
+ {
+ eglGraphics->SetFullSwapNextFrame();
+ }
+
DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Activate() \n", this, mNativeWindowId );
}
DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Activate() \n", this, mNativeWindowId );
}
@@
-412,6
+424,13
@@
void Window::Show()
mVisibilityChangedSignal.Emit( handle, true );
}
mVisibilityChangedSignal.Emit( handle, true );
}
+ GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface();
+ EglGraphics* eglGraphics = static_cast<EglGraphics*>(&graphics);
+ if (eglGraphics)
+ {
+ eglGraphics->SetFullSwapNextFrame();
+ }
+
DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Show(): iconified = %d, visible = %d\n", this, mNativeWindowId, mIconified, mVisible );
}
DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Show(): iconified = %d, visible = %d\n", this, mNativeWindowId, mIconified, mVisible );
}
@@
-430,6
+449,14
@@
void Window::Hide()
mVisibilityChangedSignal.Emit( handle, false );
}
mVisibilityChangedSignal.Emit( handle, false );
}
+
+ GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface();
+ EglGraphics* eglGraphics = static_cast<EglGraphics*>(&graphics);
+ if (eglGraphics)
+ {
+ eglGraphics->SetFullSwapNextFrame();
+ }
+
DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Hide(): iconified = %d, visible = %d\n", this, mNativeWindowId, mIconified, mVisible );
}
DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Hide(): iconified = %d, visible = %d\n", this, mNativeWindowId, mIconified, mVisible );
}
@@
-478,6
+505,13
@@
void Window::SetInputRegion( const Rect< int >& inputRegion )
{
mWindowBase->SetInputRegion( inputRegion );
{
mWindowBase->SetInputRegion( inputRegion );
+ GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface();
+ EglGraphics* eglGraphics = static_cast<EglGraphics*>(&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 );
}
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 );
}
@@
-577,7
+611,13
@@
void Window::SetSize( Dali::Window::WindowSize size )
{
Uint16Pair newSize( newRect.width, newRect.height );
{
Uint16Pair newSize( newRect.width, newRect.height );
- SurfaceResized();
+ bool forceUpdate = false;
+ if( mWindowBase->IsEglWindowRotationSupported() )
+ {
+ forceUpdate = true;
+ }
+
+ SurfaceResized( forceUpdate );
mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
@@
-589,6
+629,13
@@
void Window::SetSize( Dali::Window::WindowSize size )
mAdaptor->SurfaceResizeComplete( mSurface.get(), newSize );
}
mAdaptor->SurfaceResizeComplete( mSurface.get(), newSize );
}
+
+ GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface();
+ EglGraphics* eglGraphics = static_cast<EglGraphics*>(&graphics);
+ if (eglGraphics)
+ {
+ eglGraphics->SetFullSwapNextFrame();
+ }
}
Dali::Window::WindowSize Window::GetSize() const
}
Dali::Window::WindowSize Window::GetSize() const
@@
-609,6
+656,13
@@
void Window::SetPosition( Dali::Window::WindowPosition position )
PositionSize oldRect = mSurface->GetPositionSize();
mWindowSurface->MoveResize( PositionSize( position.GetX(), position.GetY(), oldRect.width, oldRect.height ) );
PositionSize oldRect = mSurface->GetPositionSize();
mWindowSurface->MoveResize( PositionSize( position.GetX(), position.GetY(), oldRect.width, oldRect.height ) );
+
+ GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface();
+ EglGraphics* eglGraphics = static_cast<EglGraphics*>(&graphics);
+ if (eglGraphics)
+ {
+ eglGraphics->SetFullSwapNextFrame();
+ }
}
Dali::Window::WindowPosition Window::GetPosition() const
}
Dali::Window::WindowPosition Window::GetPosition() const
@@
-637,7
+691,13
@@
void Window::SetPositionSize( PositionSize positionSize )
{
Uint16Pair newSize( newRect.width, newRect.height );
{
Uint16Pair newSize( newRect.width, newRect.height );
- SurfaceResized();
+ bool forceUpdate = false;
+ if( mWindowBase->IsEglWindowRotationSupported() )
+ {
+ forceUpdate = true;
+ }
+
+ SurfaceResized( forceUpdate );
mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
@@
-647,6
+707,13
@@
void Window::SetPositionSize( PositionSize positionSize )
mResizeSignal.Emit( handle, newSize );
mAdaptor->SurfaceResizeComplete( mSurface.get(), newSize );
}
mResizeSignal.Emit( handle, newSize );
mAdaptor->SurfaceResizeComplete( mSurface.get(), newSize );
}
+
+ GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface();
+ EglGraphics* eglGraphics = static_cast<EglGraphics*>(&graphics);
+ if (eglGraphics)
+ {
+ eglGraphics->SetFullSwapNextFrame();
+ }
}
Dali::Layer Window::GetRootLayer() const
}
Dali::Layer Window::GetRootLayer() const
@@
-711,19
+778,39
@@
void Window::OnIconifyChanged( bool iconified )
DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Deiconified: visible = %d\n", this, mNativeWindowId, mVisible );
}
DALI_LOG_RELEASE_INFO( "Window (%p), WinId (%d), Deiconified: visible = %d\n", this, mNativeWindowId, mVisible );
}
+
+ GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface();
+ EglGraphics* eglGraphics = static_cast<EglGraphics*>(&graphics);
+ if (eglGraphics)
+ {
+ eglGraphics->SetFullSwapNextFrame();
+ }
}
void Window::OnFocusChanged( bool focusIn )
{
Dali::Window handle( this );
}
void Window::OnFocusChanged( bool focusIn )
{
Dali::Window handle( this );
- mFocusChangedSignal.Emit( focusIn );
mFocusChangeSignal.Emit( handle, focusIn );
mFocusChangeSignal.Emit( handle, focusIn );
+
+ GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface();
+ EglGraphics* eglGraphics = static_cast<EglGraphics*>(&graphics);
+ if (eglGraphics)
+ {
+ eglGraphics->SetFullSwapNextFrame();
+ }
}
void Window::OnOutputTransformed()
{
}
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();
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 ) );
}
mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
}
@@
-765,7
+852,13
@@
void Window::OnRotation( const RotationEvent& rotation )
mWindowSurface->RequestRotation( mRotationAngle, mWindowWidth, mWindowHeight );
mWindowSurface->RequestRotation( mRotationAngle, mWindowWidth, mWindowHeight );
- SurfaceResized();
+ bool forceUpdate = false;
+ if( mWindowBase->IsEglWindowRotationSupported() )
+ {
+ forceUpdate = true;
+ }
+
+ SurfaceResized( forceUpdate );
mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( mWindowWidth, mWindowHeight ) );
mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( mWindowWidth, mWindowHeight ) );
@@
-784,6
+877,13
@@
void Window::OnPause()
{
mEventHandler->Pause();
}
{
mEventHandler->Pause();
}
+
+ GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface();
+ EglGraphics* eglGraphics = static_cast<EglGraphics*>(&graphics);
+ if (eglGraphics)
+ {
+ eglGraphics->SetFullSwapNextFrame();
+ }
}
void Window::OnResume()
}
void Window::OnResume()
@@
-792,6
+892,13
@@
void Window::OnResume()
{
mEventHandler->Resume();
}
{
mEventHandler->Resume();
}
+
+ GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface();
+ EglGraphics* eglGraphics = static_cast<EglGraphics*>(&graphics);
+ if (eglGraphics)
+ {
+ eglGraphics->SetFullSwapNextFrame();
+ }
}
void Window::RecalculateTouchPosition( Integration::Point& point )
}
void Window::RecalculateTouchPosition( Integration::Point& point )
@@
-915,6
+1022,16
@@
int32_t Window::GetNativeId() const
return mWindowBase->GetNativeWindowId();
}
return mWindowBase->GetNativeWindowId();
}
+void Window::SetDamagedAreas(std::vector<Dali::Rect<int>>& areas)
+{
+ GraphicsInterface& graphics = mAdaptor->GetGraphicsInterface();
+ EglGraphics* eglGraphics = static_cast<EglGraphics*>(&graphics);
+ if (eglGraphics)
+ {
+ eglGraphics->SetDamagedAreas(areas);
+ }
+}
+
} // Adaptor
} // Internal
} // Adaptor
} // Internal