X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fadaptor%2Fcommon%2Fadaptor-impl.cpp;h=50d63ec58b3cd0229a3e979097cc9af2a819d86f;hb=26b1762d139a11c3d30e108d335ba64c09554744;hp=d42eff54f6e664113dfeb284cc4b2d9f908f73bc;hpb=5ebd3b47074c58bafc5cdb95c0c8051b5af570de;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 d42eff5..50d63ec 100755 --- a/dali/internal/adaptor/common/adaptor-impl.cpp +++ b/dali/internal/adaptor/common/adaptor-impl.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include // Temporary until Core is abstracted @@ -188,11 +189,9 @@ void Adaptor::Initialize( GraphicsFactory& graphicsFactory, Dali::Configuration: defaultWindow->SetAdaptor( Get() ); - Dali::Window window( dynamic_cast( defaultWindow ) ); - if ( window ) - { - mWindowCreatedSignal.Emit( window ); - } + Dali::Integration::SceneHolder defaultSceneHolder( defaultWindow ); + + mWindowCreatedSignal.Emit( defaultSceneHolder ); const unsigned int timeInterval = mEnvironmentOptions->GetObjectProfilerInterval(); if( 0u < timeInterval ) @@ -291,7 +290,7 @@ void Adaptor::Initialize( GraphicsFactory& graphicsFactory, Dali::Configuration: } std::string systemCachePath = GetSystemCachePath(); - if ( systemCachePath.c_str() != NULL ) + if ( ! systemCachePath.empty() ) { Dali::FileStream fileStream( systemCachePath + "gpu-environment.conf", Dali::FileStream::READ | Dali::FileStream::TEXT ); std::fstream& stream = dynamic_cast( fileStream.GetStream() ); @@ -399,7 +398,7 @@ void Adaptor::Start() Dali::TizenPlatform::ImageLoader::SetMaxTextureSize( mGLES.GetMaxTextureSize() ); std::string systemCachePath = GetSystemCachePath(); - if( systemCachePath.c_str() != NULL ) + if( ! systemCachePath.empty() ) { const int dir_err = system( std::string( "mkdir " + systemCachePath ).c_str() ); if (-1 == dir_err) @@ -645,11 +644,7 @@ bool Adaptor::AddWindow( Dali::Integration::SceneHolder childWindow, const std:: // Add the new Window to the container - the order is not important mWindows.push_back( &windowImpl ); - Dali::Window window( dynamic_cast( &windowImpl ) ); - if ( window ) - { - mWindowCreatedSignal.Emit( window ); - } + mWindowCreatedSignal.Emit( childWindow ); return true; } @@ -799,6 +794,24 @@ Any Adaptor::GetNativeWindowHandle() return mWindows.front()->GetNativeHandle(); } +Any Adaptor::GetNativeWindowHandle( Dali::Actor actor ) +{ + Any nativeWindowHandle; + + Dali::Integration::Scene scene = Dali::Integration::Scene::Get( actor ); + + for( auto sceneHolder : mWindows ) + { + if ( scene == sceneHolder->GetScene() ) + { + nativeWindowHandle = sceneHolder->GetNativeHandle(); + break; + } + } + + return nativeWindowHandle; +} + Any Adaptor::GetGraphicsDisplay() { Any display; @@ -877,11 +890,10 @@ void Adaptor::RequestUpdate( bool forceUpdate ) case PAUSED: case PAUSED_WHILE_HIDDEN: { - // When Dali applications are partially visible behind the lock-screen, - // the indicator must be updated (therefore allow updates in the PAUSED state) if( forceUpdate ) { - mThreadController->RequestUpdateOnce(); + // Update (and resource upload) without rendering + mThreadController->RequestUpdateOnce( UpdateMode::SKIP_RENDER ); } break; } @@ -1052,7 +1064,7 @@ void Adaptor::RequestUpdateOnce() { if( mThreadController ) { - mThreadController->RequestUpdateOnce(); + mThreadController->RequestUpdateOnce( UpdateMode::NORMAL ); } } @@ -1098,6 +1110,18 @@ Dali::WindowContainer Adaptor::GetWindows() const return windows; } +Dali::SceneHolderList Adaptor::GetSceneHolders() const +{ + Dali::SceneHolderList sceneHolderList; + + for( auto iter = mWindows.begin(); iter != mWindows.end(); ++iter ) + { + sceneHolderList.push_back( Dali::Integration::SceneHolder( *iter ) ); + } + + return sceneHolderList; +} + Adaptor::Adaptor(Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions) : mResizedSignal(), mLanguageChangedSignal(),