X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=dali%2Finternal%2Foffscreen%2Fcommon%2Foffscreen-application-impl.cpp;h=396dbc49889a0fbdbf1b4893668f0f286605996c;hb=9c2bae6039a7b0dc11e9e67ff51b3d608ccb3e50;hp=254f42f1223675ee329caa019b59361f470e5906;hpb=b7769b595b297a4b371bbc09e01c99a47b7e5bf6;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/offscreen/common/offscreen-application-impl.cpp b/dali/internal/offscreen/common/offscreen-application-impl.cpp index 254f42f..396dbc4 100644 --- a/dali/internal/offscreen/common/offscreen-application-impl.cpp +++ b/dali/internal/offscreen/common/offscreen-application-impl.cpp @@ -25,15 +25,14 @@ #include #include -using Dali::Internal::Adaptor::ThreadMode; -using RenderMode = Dali::OffscreenApplication::RenderMode; - namespace Dali { namespace Internal { +using RenderMode = Dali::OffscreenApplication::RenderMode; + IntrusivePtr< OffscreenApplication > OffscreenApplication::New( uint16_t width, uint16_t height, Dali::Any surface, bool isTranslucent, RenderMode renderMode ) { IntrusivePtr< OffscreenApplication > offscreenApplication = new OffscreenApplication( width, height, surface, isTranslucent, renderMode ); @@ -47,8 +46,7 @@ OffscreenApplication::OffscreenApplication( uint16_t width, uint16_t height, Dal mDefaultWindow = Dali::OffscreenWindow( impl.Get() ); mAdaptor.reset( Dali::Internal::Adaptor::Adaptor::New( Dali::Integration::SceneHolder( impl.Get() ), impl->GetSurface(), NULL, - renderMode == RenderMode::AUTO ? - Dali::Internal::Adaptor::ThreadMode::NORMAL : Dali::Internal::Adaptor::ThreadMode::RUN_IF_REQUESTED ) ); + renderMode == RenderMode::AUTO ? Dali::Internal::Adaptor::ThreadMode::NORMAL : Dali::Internal::Adaptor::ThreadMode::RUN_IF_REQUESTED ) ); // Initialize default window impl->Initialize( true ); @@ -56,16 +54,20 @@ OffscreenApplication::OffscreenApplication( uint16_t width, uint16_t height, Dal void OffscreenApplication::Start() { - // Start the adaptor - mAdaptor->Start(); - mInitSignal.Emit(); - mAdaptor->NotifySceneCreated(); + // Start the adaptor + mAdaptor->Start(); + + Dali::OffscreenApplication handle( this ); + mInitSignal.Emit(); + mAdaptor->NotifySceneCreated(); } void OffscreenApplication::Stop() { // Stop the adaptor mAdaptor->Stop(); + + Dali::OffscreenApplication handle( this ); mTerminateSignal.Emit(); }