[4.0] Render to Frame Buffer Object.
[platform/core/uifw/dali-adaptor.git] / adaptors / common / adaptor-impl.cpp
index 519cac6..0c7c4e4 100644 (file)
@@ -144,7 +144,13 @@ void Adaptor::Initialize( Dali::Configuration::ContextLoss configuration )
 
   EglSyncImplementation* eglSyncImpl = mEglFactory->GetSyncImplementation();
 
-  mCore = Integration::Core::New( *this, *mPlatformAbstraction, *mGLES, *eglSyncImpl, *mGestureManager, dataRetentionPolicy );
+  mCore = Integration::Core::New( *this,
+                                  *mPlatformAbstraction,
+                                  *mGLES,
+                                  *eglSyncImpl,
+                                  *mGestureManager,
+                                  dataRetentionPolicy ,
+                                  0u != mEnvironmentOptions->GetRenderToFboInterval() );
 
   const unsigned int timeInterval = mEnvironmentOptions->GetObjectProfilerInterval();
   if( 0u < timeInterval )
@@ -276,8 +282,6 @@ void Adaptor::Start()
   // Initialize the thread controller
   mThreadController->Initialize();
 
-  mState = RUNNING;
-
   ProcessCoreEvents(); // Ensure any startup messages are processed.
 
   for ( ObserverContainer::iterator iter = mObservers.begin(), endIter = mObservers.end(); iter != endIter; ++iter )
@@ -714,7 +718,7 @@ void Adaptor::OnWindowShown()
 
 void Adaptor::OnWindowHidden()
 {
-  if ( STOPPED != mState )
+  if ( RUNNING == mState )
   {
     Pause();
 
@@ -757,6 +761,8 @@ void Adaptor::NotifySceneCreated()
 
   // process after surface is created (registering to remote surface provider if required)
   SurfaceInitialized();
+
+  mState = RUNNING;
 }
 
 void Adaptor::NotifyLanguageChanged()