#include <dali/internal/adaptor/common/adaptor-builder-impl.h>
// EXTERNAL INCLUDES
+#include <errno.h>
+#include <sys/stat.h>
#include <dali/public-api/common/stage.h>
#include <dali/public-api/actors/layer.h>
#include <dali/public-api/object/any.h>
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() );
std::string systemCachePath = GetSystemCachePath();
if( ! systemCachePath.empty() )
{
- const int dir_err = system( std::string( "mkdir " + systemCachePath ).c_str() );
- if (-1 == dir_err)
+ const int dir_err = mkdir( systemCachePath.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH );
+ if ( 0 != dir_err && errno != EEXIST )
{
- printf( "Error creating system cache directory: %s!\n", systemCachePath.c_str() );
- exit(1);
+ DALI_LOG_ERROR( "Error creating system cache directory: %s!\n", systemCachePath.c_str() );
+ exit( 1 );
}
}
mCallbackManager->RemoveIdleCallback( callback );
}
+void Adaptor::ProcessIdle()
+{
+ bool idleProcessed = mCallbackManager->ProcessIdle();
+ mNotificationOnIdleInstalled = mNotificationOnIdleInstalled && !idleProcessed;
+}
+
void Adaptor::SetPreRenderCallback( CallbackBase* callback )
{
mThreadController->SetPreRenderCallback( callback );
return *mNotificationTrigger;
}
-TriggerEventFactoryInterface& Adaptor::GetTriggerEventFactoryInterface()
-{
- return mTriggerEventFactory;
-}
-
SocketFactoryInterface& Adaptor::GetSocketFactoryInterface()
{
return mSocketFactory;
return *mPlatformAbstraction;
}
+void Adaptor::GetWindowContainerInterface( WindowContainer& windows )
+{
+ windows = mWindows;
+}
+
void Adaptor::DestroyTtsPlayer(Dali::TtsPlayer::Mode mode)
{
if( mTtsPlayers[mode] )
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()
mPerformanceInterface( nullptr ),
mKernelTracer(),
mSystemTracer(),
- mTriggerEventFactory(),
mObjectProfiler( nullptr ),
mSocketFactory(),
mEnvironmentOptionsOwned( environmentOptions ? false : true /* If not provided then we own the object */ ),