Rendering API clean-up
[platform/core/uifw/dali-core.git] / dali / internal / update / manager / update-manager.h
index 4d67b2f..54d8d96 100644 (file)
@@ -78,7 +78,7 @@ class RenderQueue;
 class TextureCache;
 class Geometry;
 class PropertyBuffer;
-class Material;
+class TextureSet;
 
 /**
  * UpdateManager maintains a scene graph i.e. a tree of nodes and attachments and
@@ -165,14 +165,6 @@ public:
   void DisconnectNode( Node* node );
 
   /**
-   * Called when a property is set on a disconnected Node (via public API)
-   * A disconnected Node has has no parent or children, and its properties cannot be animated/constrained.
-   * @pre The node does not have a parent.
-   * @param[in] node The node to set as "active".
-   */
-  void SetNodeActive( Node* node );
-
-  /**
    * Destroy a Node owned by UpdateManager.
    * This is not immediate; Nodes are passed to the RenderQueue to allow GL resources to be deleted.
    * In the following update, the previously queued Nodes may be deleted.
@@ -258,13 +250,19 @@ public:
    */
   ObjectOwnerContainer< Geometry >& GetGeometryOwner();
 
+  /**
+   * @brief Get the renderer owner
+   *
+   * @return The renderer owner
+   */
   ObjectOwnerContainer< Renderer >& GetRendererOwner();
+
   /**
-   * @brief Get the material owner
+   * @brief Get the texture set owner
    *
-   * @return The material owner
+   * @return The texture set owner
    */
-  ObjectOwnerContainer< Material >& GetMaterialOwner();
+  ObjectOwnerContainer< TextureSet >& GetTexturesOwner();
 
   /**
    * @brief Get the property buffer owner
@@ -423,17 +421,10 @@ public:
    * Sets the data of an existing property buffer
    * @param[in] propertyBuffer The property buffer.
    * @param[in] data The new data of the buffer
-   * @post Sends a message to RenderManager to set the new data to the property buffer.
-   */
-  void SetPropertyBufferData(Render::PropertyBuffer* propertyBuffer, Dali::Vector<char>* data);
-
-  /**
-   * Sets the size of an existing property buffer
-   * @param[in] propertyBuffer The property buffer.
    * @param[in] size The new size of the buffer
-   * @post Sends a message to RenderManager to set the new size to the property buffer.
+   * @post Sends a message to RenderManager to set the new data to the property buffer.
    */
-  void SetPropertyBufferSize(Render::PropertyBuffer* propertyBuffer, size_t size );
+  void SetPropertyBufferData(Render::PropertyBuffer* propertyBuffer, Dali::Vector<char>* data, size_t size);
 
 public:
 
@@ -519,12 +510,22 @@ private:
   void Animate( BufferIndex bufferIndex, float elapsedSeconds );
 
   /**
-   * Perform constraint updates.
-   * @note Applies constraints to nodes first (depth first search order).
-   * Then shader constraints second (construction order)
+   * Applies constraints to CustomObjects
+   * @param[in] bufferIndex to use
+   */
+  void ConstrainCustomObjects( BufferIndex bufferIndex );
+
+  /**
+   * Applies constraints to RenderTasks
+   * @param[in] bufferIndex to use
+   */
+  void ConstrainRenderTasks( BufferIndex bufferIndex );
+
+  /**
+   * Applies constraints to Shaders
    * @param[in] bufferIndex to use
    */
-  void ApplyConstraints( BufferIndex bufferIndex );
+  void ConstrainShaders( BufferIndex bufferIndex );
 
   /**
    * Perform property notification updates
@@ -533,9 +534,9 @@ private:
   void ProcessPropertyNotifications( BufferIndex bufferIndex );
 
   /**
-   * Prepare materials for rendering
+   * Prepare textures for rendering
    */
-  void PrepareMaterials();
+  void PrepareTextureSets( BufferIndex bufferIndex );
 
   /**
    * Pass shader binaries queued here on to event thread.
@@ -963,29 +964,17 @@ inline void SetPropertyBufferFormat( UpdateManager& manager, Render::PropertyBuf
   new (slot) LocalType( &manager, &UpdateManager::SetPropertyBufferFormat, &propertyBuffer, format );
 }
 
-inline void SetPropertyBufferData( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, Vector<char>* data )
-{
-  typedef MessageValue2< UpdateManager, Render::PropertyBuffer*, Vector<char>*  > LocalType;
-
-  // 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::SetPropertyBufferData, &propertyBuffer, data );
-}
-
-inline void SetPropertyBufferSize( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, size_t size )
+inline void SetPropertyBufferData( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, Vector<char>* data, size_t size )
 {
-  typedef MessageValue2< UpdateManager, Render::PropertyBuffer*, size_t  > LocalType;
+  typedef MessageValue3< UpdateManager, Render::PropertyBuffer*, Vector<char>*, size_t  > LocalType;
 
   // 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::SetPropertyBufferSize, &propertyBuffer, size );
+  new (slot) LocalType( &manager, &UpdateManager::SetPropertyBufferData, &propertyBuffer, data, size );
 }
 
-
 } // namespace SceneGraph
 
 } // namespace Internal