if( mScreenRotationAngle != 0 )
{
mScreenRotationFinished = false;
+ mResizeFinished = false;
}
}
void WindowRenderSurface::RequestRotation( int angle, int width, int height )
{
- if( !mRotationSupported )
- {
- DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::Rotate: Rotation is not supported!\n" );
- return;
- }
-
if( !mRotationTrigger )
{
TriggerEventFactoryInterface& triggerFactory = Internal::Adaptor::Adaptor::GetImplementation( Adaptor::Get() ).GetTriggerEventFactoryInterface();
dpiVertical = mDpiVertical;
}
+int WindowRenderSurface::GetOrientation() const
+{
+ return mWindowBase->GetOrientation();
+}
+
void WindowRenderSurface::InitializeGraphics()
{
// Check rotation capability
mRotationSupported = mWindowBase->IsEglWindowRotationSupported();
- int screenWidth, screenHeight;
- WindowSystem::GetScreenSize( screenWidth, screenHeight );
- DALI_LOG_RELEASE_INFO("WindowRenderSurface::CreateSurface: w = %d h = %d screenWidth = %d screenHeight = %d angle = %d screen rotation = %d\n",
- mPositionSize.width, mPositionSize.height, screenWidth, screenHeight, mRotationAngle, mScreenRotationAngle );
+ DALI_LOG_RELEASE_INFO("WindowRenderSurface::CreateSurface: w = %d h = %d angle = %d screen rotation = %d\n",
+ mPositionSize.width, mPositionSize.height, mRotationAngle, mScreenRotationAngle );
}
void WindowRenderSurface::DestroySurface()
if( resizingSurface )
{
+ int totalAngle = (mRotationAngle + mScreenRotationAngle) % 360;
+
// Window rotate or screen rotate
if( !mRotationFinished || !mScreenRotationFinished )
{
- int totalAngle = (mRotationAngle + mScreenRotationAngle) % 360;
-
mWindowBase->SetEglWindowRotation( totalAngle );
mWindowBase->SetEglWindowBufferTransform( totalAngle );
}
// Resize case
- if( !mResizeFinished )
+ if ( !mResizeFinished )
{
- mWindowBase->ResizeEglWindow( mPositionSize );
+ Dali::PositionSize positionSize;
+ positionSize.x = mPositionSize.x;
+ positionSize.y = mPositionSize.y;
+ if( totalAngle == 0 || totalAngle == 180 )
+ {
+ positionSize.width = mPositionSize.width;
+ positionSize.height = mPositionSize.height;
+ }
+ else
+ {
+ positionSize.width = mPositionSize.height;
+ positionSize.height = mPositionSize.width;
+ }
+
+ mWindowBase->ResizeEglWindow( positionSize );
mResizeFinished = true;
DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::PreRender: Set resize\n" );
{
mScreenRotationAngle = screenRotationAngle;
mScreenRotationFinished = false;
+ mResizeFinished = false;
mOutputTransformedSignal.Emit();