X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fadaptor%2Fcommon%2Fadaptor-impl.cpp;h=e06310a26957df7c8a41ec4894c649403672c10c;hb=e99e2cb33e64139dd7007faaf95605a7ba1375d3;hp=4d1782fd9693ee3c507819aa92fa987fd75d908b;hpb=d3cf78321d4ad9e76c4258a0aa8bf78078cb7250;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/adaptor/common/adaptor-impl.cpp b/dali/internal/adaptor/common/adaptor-impl.cpp index 4d1782f..e06310a 100755 --- a/dali/internal/adaptor/common/adaptor-impl.cpp +++ b/dali/internal/adaptor/common/adaptor-impl.cpp @@ -192,7 +192,7 @@ void Adaptor::Initialize( GraphicsFactory& graphicsFactory, Dali::Configuration: mObjectProfiler = new ObjectProfiler( timeInterval ); } - mNotificationTrigger = mTriggerEventFactory.CreateTriggerEvent( MakeCallback( this, &Adaptor::ProcessCoreEvents ), TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER); + mNotificationTrigger = TriggerEventFactory::CreateTriggerEvent( MakeCallback( this, &Adaptor::ProcessCoreEvents ), TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER); mDisplayConnection = Dali::DisplayConnection::New( *mGraphics, defaultWindow->GetSurface()->GetSurfaceType() ); @@ -555,16 +555,6 @@ void Adaptor::ReplaceSurface( Dali::Integration::SceneHolder window, Dali::Rende } } -void Adaptor::DeleteSurface( Dali::RenderSurfaceInterface& surface ) -{ - // Flush the event queue to give the update-render thread chance - // to start processing messages for new camera setup etc as soon as possible - ProcessCoreEvents(); - - // This method blocks until the render thread has finished rendering the current surface. - mThreadController->DeleteSurface( &surface ); -} - Dali::RenderSurfaceInterface& Adaptor::GetSurface() const { return *mWindows.front()->GetSurface(); @@ -604,6 +594,12 @@ void Adaptor::RemoveIdle( CallbackBase* callback ) mCallbackManager->RemoveIdleCallback( callback ); } +void Adaptor::ProcessIdle() +{ + bool idleProcessed = mCallbackManager->ProcessIdle(); + mNotificationOnIdleInstalled = mNotificationOnIdleInstalled && !idleProcessed; +} + void Adaptor::SetPreRenderCallback( CallbackBase* callback ) { mThreadController->SetPreRenderCallback( callback ); @@ -717,11 +713,6 @@ TriggerEventInterface& Adaptor::GetProcessCoreEventsTrigger() return *mNotificationTrigger; } -TriggerEventFactoryInterface& Adaptor::GetTriggerEventFactoryInterface() -{ - return mTriggerEventFactory; -} - SocketFactoryInterface& Adaptor::GetSocketFactoryInterface() { return mSocketFactory; @@ -758,6 +749,11 @@ Integration::PlatformAbstraction& Adaptor::GetPlatformAbstraction() const return *mPlatformAbstraction; } +void Adaptor::GetWindowContainerInterface( WindowContainer& windows ) +{ + windows = mWindows; +} + void Adaptor::DestroyTtsPlayer(Dali::TtsPlayer::Mode mode) { if( mTtsPlayers[mode] ) @@ -973,11 +969,12 @@ void Adaptor::SurfaceResizePrepare( Dali::RenderSurfaceInterface* surface, Surfa void Adaptor::SurfaceResizeComplete( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize ) { + // Nofify surface resizing before flushing event queue + mThreadController->ResizeSurface(); + // Flush the event queue to give the update-render thread chance // to start processing messages for new camera setup etc as soon as possible ProcessCoreEvents(); - - mThreadController->ResizeSurface(); } void Adaptor::NotifySceneCreated() @@ -1042,6 +1039,11 @@ bool Adaptor::IsMultipleWindowSupported() const return mConfigurationManager->IsMultipleWindowSupported(); } +bool Adaptor::IsRenderingWindows() const +{ + return ( mThreadController && mThreadController->IsRenderingWindows() ); +} + void Adaptor::RequestUpdateOnce() { if( mThreadController ) @@ -1128,7 +1130,6 @@ Adaptor::Adaptor(Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, mPerformanceInterface( nullptr ), mKernelTracer(), mSystemTracer(), - mTriggerEventFactory(), mObjectProfiler( nullptr ), mSocketFactory(), mEnvironmentOptionsOwned( environmentOptions ? false : true /* If not provided then we own the object */ ),