+inline void AddRenderTaskListMessage( UpdateManager& manager, OwnerPointer< SceneGraph::RenderTaskList >& taskList )
+{
+ typedef MessageValue1< UpdateManager, OwnerPointer< SceneGraph::RenderTaskList > > LocalType;
+
+ // Reserve some memory inside the message queue
+ uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
+
+ // Construct message in the message queue memory; note that delete should not be called on the return value
+ new (slot) LocalType( &manager, &UpdateManager::AddRenderTaskList, taskList );
+}
+
+inline void RemoveRenderTaskListMessage( UpdateManager& manager, const RenderTaskList& constTaskList )
+{
+ // The scene-graph thread owns this object so it can safely edit it.
+ RenderTaskList& taskList = const_cast< RenderTaskList& >( constTaskList );
+
+ typedef MessageValue1< UpdateManager, RenderTaskList* > LocalType;
+
+ // Reserve some memory inside the message queue
+ uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
+
+ // Construct message in the message queue memory; note that delete should not be called on the return value
+ new (slot) LocalType( &manager, &UpdateManager::RemoveRenderTaskList, &taskList );
+}
+