mRenderManager->ContextDestroyed();
}
-void Core::SurfaceResized( Integration::RenderSurface* surface )
+void Core::SurfaceResized( Integration::RenderSurface* surface, bool forceUpdate )
{
for( auto iter = mScenes.begin(); iter != mScenes.end(); ++iter )
{
if( (*iter)->GetSurface() == surface )
{
- (*iter)->SurfaceResized();
+ (*iter)->SurfaceResized( forceUpdate );
+ }
+ }
+}
+
+void Core::SurfaceDeleted( Integration::RenderSurface* surface )
+{
+ for( auto scene : mScenes )
+ {
+ if( scene->GetSurface() == surface )
+ {
+ scene->SurfaceDeleted();
+ break;
}
}
}
// Signal that any messages received will be flushed soon
mUpdateManager->EventProcessingStarted();
+ // Scene could be added or removed while processing the events
+ // Copy the Scene container locally to avoid possibly invalid iterator
+ SceneContainer scenes = mScenes;
+
// process events in all scenes
- for( auto iter = mScenes.begin(); iter != mScenes.end(); ++iter )
+ for( auto scene : scenes )
{
- (*iter)->ProcessEvents();
+ scene->ProcessEvents();
}
mNotificationManager->ProcessMessages();
// Emit signal here to inform listeners that event processing has finished.
- for( auto iter = mScenes.begin(); iter != mScenes.end(); ++iter )
+ for( auto scene : scenes )
{
- (*iter)->EmitEventProcessingFinishedSignal();
+ scene->EmitEventProcessingFinishedSignal();
}
// Run any registered processors
mRelayoutController->Relayout();
// Rebuild depth tree after event processing has finished
- for( auto iter = mScenes.begin(); iter != mScenes.end(); ++iter )
+ for( auto scene : scenes )
{
- (*iter)->RebuildDepthTree();
+ scene->RebuildDepthTree();
}
// Flush any queued messages for the update-thread