[dali_2.0.3] Merge branch 'devel/master'
[platform/core/uifw/dali-core.git] / dali / internal / update / manager / update-manager.h
index 3368970..4f2214a 100644 (file)
@@ -98,9 +98,7 @@ struct NodeDepthPair
 
 struct NodeDepths
 {
-  NodeDepths()
-  {
-  }
+  NodeDepths() = default;
 
   void Add( SceneGraph::Node* node, uint32_t sortedDepth )
   {
@@ -636,6 +634,12 @@ public:
   void SetDefaultSurfaceRect( const Rect<int>& rect );
 
   /**
+   * Set the default surface orientation.
+   * @param[in] orientation The orientation value representing the surface.
+   */
+  void SetDefaultSurfaceOrientation(int orientation);
+
+  /**
    * @copydoc Dali::Stage::KeepRendering()
    */
   void KeepRendering( float durationSeconds );
@@ -1097,6 +1101,17 @@ inline void SurfaceReplacedMessage( UpdateManager& manager, const SceneGraph::Sc
   new (slot) LocalType( &manager, &UpdateManager::SurfaceReplaced, &scene );
 }
 
+inline void SetDefaultSurfaceOrientationMessage(UpdateManager& manager, int orientation)
+{
+  using LocalType = MessageValue1<UpdateManager, int>;
+
+  // Reserve some memory inside the message queue
+  unsigned int* 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::SetDefaultSurfaceOrientation, orientation);
+}
+
 inline void KeepRenderingMessage( UpdateManager& manager, float durationSeconds )
 {
   using LocalType = MessageValue1<UpdateManager, float>;
@@ -1348,9 +1363,7 @@ public:
   /**
    * Virtual destructor
    */
-  ~IndexBufferMessage() override
-  {
-  }
+  ~IndexBufferMessage() override = default;
 
   /**
    * @copydoc MessageBase::Process