/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// Check the Notification Manager message queue to set needsNotification
status.needsNotification = mNotificationManager->MessagesToProcess();
+ // Check if the default surface is changed
+ status.surfaceRectChanged = mUpdateManager->IsDefaultSurfaceRectChanged();
+
// No need to keep update running if there are notifications to process.
// Any message to update will wake it up anyways
}
// Emit signal here to inform listeners that event processing has finished.
mStage->EmitEventProcessingFinishedSignal();
+ // Run any registered processors
+ RunProcessors();
+
// Run the size negotiation after event processing finished signal
mRelayoutController->Relayout();
+
// Rebuild depth tree after event processing has finished
mStage->RebuildDepthTree();
mStage->SetStereoBase( stereoBase );
}
+void Core::RegisterProcessor( Integration::Processor& processor )
+{
+ mProcessors.PushBack(&processor);
+}
+
+void Core::UnregisterProcessor( Integration::Processor& processor )
+{
+ auto iter = std::find( mProcessors.Begin(), mProcessors.End(), &processor );
+ if( iter != mProcessors.End() )
+ {
+ mProcessors.Erase( iter );
+ }
+}
+
+void Core::RunProcessors()
+{
+ // Copy processor pointers to prevent changes to vector affecting loop iterator.
+ Dali::Vector<Integration::Processor*> processors( mProcessors );
+
+ for( auto processor : processors )
+ {
+ if( processor )
+ {
+ processor->Process();
+ }
+ }
+}
+
float Core::GetStereoBase() const
{
return mStage->GetStereoBase();