[4.0] Supports screen rotation.
[platform/core/uifw/dali-adaptor.git] / adaptors / common / adaptor-impl.cpp
old mode 100644 (file)
new mode 100755 (executable)
index ff2479b..67e759f
@@ -328,6 +328,8 @@ void Adaptor::Start()
 // Dali::Internal::Adaptor::Adaptor::Pause
 void Adaptor::Pause()
 {
+  DALI_LOG_RELEASE_INFO( "Adaptor::Pause: mState [%d]\n", mState );
+
   // Only pause the adaptor if we're actually running.
   if( RUNNING == mState )
   {
@@ -354,6 +356,8 @@ void Adaptor::Pause()
 // Dali::Internal::Adaptor::Adaptor::Resume
 void Adaptor::Resume()
 {
+  DALI_LOG_RELEASE_INFO( "Adaptor::Resume: mState [%d]\n", mState );
+
   // Only resume the adaptor if we are in the suspended state.
   if( PAUSED == mState )
   {
@@ -739,6 +743,8 @@ void Adaptor::RequestProcessEventsOnIdle( bool forceProcess )
 
 void Adaptor::OnWindowShown()
 {
+  DALI_LOG_RELEASE_INFO( "Adaptor::OnWindowShown: mState [%d]\n", mState );
+
   if ( PAUSED_WHILE_HIDDEN == mState )
   {
     // Adaptor can now be resumed
@@ -753,6 +759,8 @@ void Adaptor::OnWindowShown()
 
 void Adaptor::OnWindowHidden()
 {
+  DALI_LOG_RELEASE_INFO( "Adaptor::OnWindowHidden: mState [%d]\n", mState );
+
   if ( RUNNING == mState )
   {
     Pause();
@@ -769,6 +777,14 @@ void Adaptor::OnDamaged( const DamageArea& area )
   RequestUpdate( false );
 }
 
+void Adaptor::SurfaceResizePrepare( SurfaceSize surfaceSize, int orientation )
+{
+  // let the core know the surface size and orientation has changed
+  mCore->SurfaceResized( surfaceSize.GetWidth(), surfaceSize.GetHeight(), orientation );
+
+  mResizedSignal.Emit( mAdaptor );
+}
+
 void Adaptor::SurfaceResizePrepare( SurfaceSize surfaceSize )
 {
   // let the core know the surface size has changed
@@ -783,7 +799,6 @@ void Adaptor::SurfaceResizeComplete( SurfaceSize surfaceSize )
   // to start processing messages for new camera setup etc as soon as possible
   ProcessCoreEvents();
 
-  // this method blocks until the render thread has completed the resizing.
   mThreadController->ResizeSurface();
 }