[dali_1.2.40] Merge branch 'devel/master'
[platform/core/uifw/dali-core.git] / dali / internal / update / manager / update-manager.h
index cdec3ec..4f92d2c 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_SCENE_GRAPH_UPDATE_MANAGER_H__
-#define __DALI_INTERNAL_SCENE_GRAPH_UPDATE_MANAGER_H__
+#ifndef DALI_INTERNAL_SCENE_GRAPH_UPDATE_MANAGER_H
+#define DALI_INTERNAL_SCENE_GRAPH_UPDATE_MANAGER_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -22,8 +22,6 @@
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/common/dali-common.h>
 
-#include <dali/integration-api/resource-declarations.h>
-
 #include <dali/internal/common/message.h>
 #include <dali/internal/common/type-abstraction-enums.h>
 #include <dali/internal/common/shader-saver.h>
 #include <dali/internal/update/animation/scene-graph-animation.h>
 #include <dali/internal/update/common/scene-graph-buffers.h>
 #include <dali/internal/update/common/scene-graph-property-notification.h>
-#include <dali/internal/update/manager/object-owner-container.h>
 #include <dali/internal/update/nodes/node.h>
 #include <dali/internal/update/nodes/scene-graph-layer.h>
-#include <dali/internal/update/rendering/scene-graph-renderer.h>
-#include <dali/internal/render/shaders/scene-graph-shader.h>
+#include <dali/internal/update/rendering/scene-graph-renderer.h>  // for OwnerPointer< Renderer >
+#include <dali/internal/update/rendering/scene-graph-texture-set.h> // for OwnerPointer< TextureSet >
+#include <dali/internal/update/gestures/scene-graph-pan-gesture.h>
+#include <dali/internal/update/render-tasks/scene-graph-camera.h>
+#include <dali/internal/render/shaders/scene-graph-shader.h>   // for OwnerPointer< Shader >
 #include <dali/internal/render/renderers/render-property-buffer.h>
+#include <dali/internal/event/rendering/texture-impl.h>
 
 namespace Dali
 {
@@ -54,12 +55,12 @@ namespace Internal
 class PropertyNotifier;
 class NotificationManager;
 class CompleteNotificationInterface;
-class ResourceManager;
 class TouchResampler;
 
 namespace Render
 {
-class Sampler;
+struct Sampler;
+class FrameBuffer;
 }
 // value types used by messages
 template <> struct ParameterType< PropertyNotification::NotifyMode >
@@ -70,14 +71,37 @@ namespace SceneGraph
 
 class Animation;
 class DiscardQueue;
-class PanGesture;
 class RenderManager;
 class RenderTaskList;
+class RenderTaskProcessor;
 class RenderQueue;
-class TextureCacheDispatcher;
 class PropertyBuffer;
-class TextureSet;
-class Camera;
+
+struct NodeDepthPair
+{
+  SceneGraph::Node* node;
+  uint32_t sortedDepth;
+  NodeDepthPair( SceneGraph::Node* node, uint32_t sortedDepth )
+  : node(node),
+    sortedDepth(sortedDepth)
+  {
+  }
+};
+
+struct NodeDepths
+{
+  std::vector<NodeDepthPair> nodeDepths;
+  NodeDepths( int reserveSize )
+  {
+    nodeDepths.reserve(reserveSize);
+  }
+
+  void Add( SceneGraph::Node* node, uint32_t sortedDepth )
+  {
+    nodeDepths.push_back( NodeDepthPair( node, sortedDepth ) );
+  }
+};
+
 
 /**
  * UpdateManager maintains a scene graph i.e. a tree of nodes as well as
@@ -96,24 +120,20 @@ public:
    * @param[in] notificationManager This should be notified when animations have finished.
    * @param[in] animationFinishedNotifier The CompleteNotificationInterface that handles animation completions
    * @param[in] propertyNotifier The PropertyNotifier
-   * @param[in] resourceManager The resource manager used to load textures etc.
    * @param[in] discardQueue Nodes are added here when disconnected from the scene-graph.
    * @param[in] controller After messages are flushed, we request a render from the RenderController.
    * @param[in] renderManager This is responsible for rendering the results of each "update".
    * @param[in] renderQueue Used to queue messages for the next render.
-   * @param[in] textureCacheDispatcher Used for sending messages to texture cache.
-   * @param[in] touchResampler Used for re-sampling touch events.
+   * @param[in] renderTaskProcessor Handles RenderTasks and RenderInstrucitons.
    */
   UpdateManager( NotificationManager& notificationManager,
                  CompleteNotificationInterface& animationFinishedNotifier,
                  PropertyNotifier& propertyNotifier,
-                 ResourceManager& resourceManager,
                  DiscardQueue& discardQueue,
                  Integration::RenderController& controller,
                  RenderManager& renderManager,
                  RenderQueue& renderQueue,
-                 TextureCacheDispatcher& textureCacheDispatcher,
-                 TouchResampler& touchResampler );
+                 RenderTaskProcessor& renderTaskProcessor );
 
   /**
    * Destructor.
@@ -123,13 +143,6 @@ public:
   // Node connection methods
 
   /**
-   * Get the scene graph side list of RenderTasks.
-   * @param[in] systemLevel True if using the system-level overlay.
-   * @return The list of render tasks
-   */
-  RenderTaskList* GetRenderTaskList( bool systemLevel );
-
-  /**
    * Installs a new layer as the root node.
    * @pre The UpdateManager does not already have an installed root node.
    * @pre The layer is of derived Node type Layer.
@@ -246,21 +259,6 @@ public:
    */
   void PropertyNotificationSetNotify( PropertyNotification* propertyNotification, PropertyNotification::NotifyMode notifyMode );
 
-  /**
-   * @brief Get the renderer owner
-   *
-   * @return The renderer owner
-   */
-  ObjectOwnerContainer< Renderer >& GetRendererOwner();
-
-  /**
-   * @brief Get the property buffer owner
-   *
-   * @return The property buffer owner
-   */
-  ObjectOwnerContainer< PropertyBuffer >& GetPropertyBufferOwner();
-
-
   // Shaders
 
   /**
@@ -279,21 +277,6 @@ public:
   void RemoveShader(Shader* shader);
 
   /**
-   * Add a newly created TextureSet.
-   * @param[in] textureSet The texture set to add.
-   * @post The TextureSet is owned by the UpdateManager.
-   */
-  void AddTextureSet(TextureSet* textureSet);
-
-  /**
-   * Remove a TextureSet.
-   * @pre The TextureSet has been added to the UpdateManager.
-   * @param[in] textureSet The TextureSet to remove.
-   * @post The TextureSet is destroyed.
-   */
-  void RemoveTextureSet(TextureSet* textureSet);
-
-  /**
    * Set the shader program for a Shader object
    * @param[in] shader        The shader to modify
    * @param[in] shaderData    Source code, hash over source, and optional compiled binary for the shader program
@@ -314,22 +297,55 @@ public:
    */
   void SetShaderSaver( ShaderSaver& upstream );
 
+  // Renderers
+
+  /**
+   * Add a new renderer to scene
+   * @param renderer to add
+   */
+  void AddRenderer( Renderer* renderer );
+
+  /**
+   * Add a renderer from scene
+   * @param renderer to remove
+   */
+  void RemoveRenderer( Renderer* renderer );
+
   // Gestures
 
   /**
-   * Add a newly created gesture.
-   * @param[in] gesture The gesture to add.
-   * @post The gesture is owned by the UpdateManager.
+   * Set the pan gesture processor.
+   * Pan Gesture processor lives for the lifetime of UpdateManager
+   * @param[in] gesture The gesture processor.
+   * @post The gestureProcessor is owned by the UpdateManager.
+   */
+  void SetPanGestureProcessor( PanGesture* gestureProcessor );
+
+  // Textures
+
+  /**
+   * Add a newly created TextureSet.
+   * @param[in] textureSet The texture set to add.
+   * @post The TextureSet is owned by the UpdateManager.
+   */
+  void AddTextureSet( TextureSet* textureSet );
+
+  /**
+   * Remove a TextureSet.
+   * @pre The TextureSet has been added to the UpdateManager.
+   * @param[in] textureSet The TextureSet to remove.
+   * @post The TextureSet is destroyed.
    */
-  void AddGesture( PanGesture* gesture );
+  void RemoveTextureSet( TextureSet* textureSet );
+
+  // Render tasks
 
   /**
-   * Remove a gesture.
-   * @pre The gesture has been added to the UpdateManager.
-   * @param[in] gesture The gesture to remove.
-   * @post The gesture is destroyed.
+   * Get the scene graph side list of RenderTasks.
+   * @param[in] systemLevel True if using the system-level overlay.
+   * @return The list of render tasks
    */
-  void RemoveGesture( PanGesture* gesture );
+  RenderTaskList* GetRenderTaskList( bool systemLevel );
 
 // Message queue handling
 
@@ -393,10 +409,11 @@ public:
   /**
    * Sets the wrap mode for an existing sampler
    * @param[in] sampler The sampler
-   * @param[in] uWrapMode Wrapping mode in x direction
-   * @param[in] vWrapMode Wrapping mode in y direction
+   * @param[in] rWrapMode Wrapping mode in z direction
+   * @param[in] sWrapMode Wrapping mode in x direction
+   * @param[in] tWrapMode Wrapping mode in y direction
    */
-  void SetWrapMode( Render::Sampler* sampler, unsigned int uWrapMode, unsigned int vWrapMode );
+  void SetWrapMode( Render::Sampler* sampler, unsigned int rWrapMode, unsigned int sWrapMode, unsigned int tWrapMode );
 
   /**
    * Add a new property buffer to RenderManager
@@ -473,6 +490,56 @@ public:
    */
   void RemoveVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
 
+  /**
+   * Adds a texture to the render manager
+   * @param[in] texture The texture to add
+   * The texture will be owned by RenderManager
+   */
+  void AddTexture( Render::Texture* texture );
+
+  /**
+   * Removes a texture from the render manager
+   * @param[in] texture The texture to remove
+   * @post The texture will be destroyed in the render thread
+   */
+  void RemoveTexture( Render::Texture* texture );
+
+  /**
+   * Uploads data to a texture owned by the RenderManager
+   * @param[in] texture The texture
+   * @param[in] pixelData The pixel data object
+   * @param[in] params The parameters for the upload
+   */
+  void UploadTexture( Render::Texture* texture, PixelDataPtr pixelData, const Texture::UploadParams& params );
+
+  /**
+   * Generates mipmaps for a texture owned by the RenderManager
+   * @param[in] texture The texture
+   */
+  void GenerateMipmaps( Render::Texture* texture );
+
+  /**
+   * Adds a framebuffer to the render manager
+   * @param[in] frameBuffer The framebuffer to add
+   * The framebuffer will be owned by RenderManager
+   */
+  void AddFrameBuffer( Render::FrameBuffer* frameBuffer );
+
+  /**
+   * Removes a FrameBuffer from the render manager
+   * @param[in] frameBuffer The FrameBuffer to remove
+   * @post The FrameBuffer will be destroyed in the render thread
+   */
+  void RemoveFrameBuffer( Render::FrameBuffer* frameBuffer );
+
+  /**
+   * Attach a texture as color output to an existing FrameBuffer
+   * @param[in] frameBuffer The FrameBuffer
+   * @param[in] texture The texture that will be used as output when rendering
+   * @param[in] mipmapLevel The mipmap of the texture to be attached
+   * @param[in] layer Indicates which layer of a cube map or array texture to attach. Unused for 2D textures
+   */
+  void AttachColorTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, unsigned int mipmapLevel, unsigned int face );
 
 public:
 
@@ -509,6 +576,12 @@ public:
    */
   void SetLayerDepths( const std::vector< Layer* >& layers, bool systemLevel );
 
+  /**
+   * Set the depth indices of all nodes (in LayerUI's)
+   * @param[in] nodeDepths A vector of nodes and associated depth indices
+   */
+  void SetDepthIndices( NodeDepths* nodeDepths );
+
 private:
 
   // Undefined
@@ -525,11 +598,6 @@ private:
   unsigned int KeepUpdatingCheck( float elapsedSeconds ) const;
 
   /**
-   * Post process resources that have been updated by renderer
-   */
-  void PostProcessResources();
-
-  /**
    * Helper to reset all Node properties
    * @param[in] bufferIndex to use
    */
@@ -576,11 +644,6 @@ private:
   void ProcessPropertyNotifications( BufferIndex bufferIndex );
 
   /**
-   * Prepare textures for rendering
-   */
-  void PrepareTextureSets( BufferIndex bufferIndex );
-
-  /**
    * Pass shader binaries queued here on to event thread.
    */
   void ForwardCompiledShadersToEventThread();
@@ -611,7 +674,8 @@ private:
 
 inline void InstallRootMessage( UpdateManager& manager, Layer& root, bool systemLevel )
 {
-  typedef MessageValue2< UpdateManager, Layer*, bool > LocalType;
+  // Message has ownership of Layer while in transit from event -> update
+  typedef MessageValue2< UpdateManager, OwnerPointer<Layer>, bool > LocalType;
 
   // Reserve some memory inside the message queue
   unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
@@ -622,6 +686,7 @@ inline void InstallRootMessage( UpdateManager& manager, Layer& root, bool system
 
 inline void AddNodeMessage( UpdateManager& manager, Node& node )
 {
+  // Message has ownership of Node while in transit from event -> update
   typedef MessageValue1< UpdateManager, OwnerPointer<Node> > LocalType;
 
   // Reserve some memory inside the message queue
@@ -676,7 +741,8 @@ inline void DestroyNodeMessage( UpdateManager& manager, const Node& constNode )
 
 inline void AddCameraMessage( UpdateManager& manager, const Camera* constCamera )
 {
-  typedef MessageValue1< UpdateManager, Camera* > LocalType;
+  // Message has ownership of Camera while in transit from event -> update
+  typedef MessageValue1< UpdateManager, OwnerPointer< Camera > > LocalType;
 
   Camera* camera = const_cast<Camera*>( constCamera );
   // Reserve some memory inside the message queue
@@ -699,6 +765,7 @@ inline void RemoveCameraMessage( UpdateManager& manager, const Camera* camera )
 
 inline void AddObjectMessage( UpdateManager& manager, PropertyOwner* object )
 {
+  // Message has ownership of object while in transit from event -> update
   typedef MessageValue1< UpdateManager, OwnerPointer<PropertyOwner> > LocalType;
 
   // Reserve some memory inside the message queue
@@ -760,7 +827,8 @@ inline void RemoveAnimationMessage( UpdateManager& manager, const Animation& con
 
 inline void AddPropertyNotificationMessage( UpdateManager& manager, PropertyNotification* propertyNotification )
 {
-  typedef MessageValue1< UpdateManager, PropertyNotification* > LocalType;
+  // Message has ownership of PropertyNotification while in transit from event -> update
+  typedef MessageValue1< UpdateManager, OwnerPointer< PropertyNotification > > LocalType;
 
   // Reserve some memory inside the message queue
   unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
@@ -887,48 +955,24 @@ inline void SetLayerDepthsMessage( UpdateManager& manager, const std::vector< La
   new (slot) LocalType( &manager, &UpdateManager::SetLayerDepths, layers, systemLevel );
 }
 
-inline void AddGestureMessage( UpdateManager& manager, PanGesture* gesture )
-{
-  typedef MessageValue1< UpdateManager, PanGesture* > 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::AddGesture, gesture );
-}
-
-inline void RemoveGestureMessage( UpdateManager& manager, PanGesture* gesture )
-{
-  typedef MessageValue1< UpdateManager, PanGesture* > 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::RemoveGesture, gesture );
-}
-
-template< typename T >
-inline void AddMessage( UpdateManager& manager, ObjectOwnerContainer<T>& owner, T& object )
+inline void AddRendererMessage( UpdateManager& manager, Renderer& object )
 {
-  typedef MessageValue1< ObjectOwnerContainer<T>, OwnerPointer< T > > LocalType;
+  typedef MessageValue1< UpdateManager, OwnerPointer< Renderer > > 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( &owner, &ObjectOwnerContainer<T>::Add, &object );
+  new (slot) LocalType( &manager, &UpdateManager::AddRenderer, &object );
 }
 
-template< typename T >
-inline void RemoveMessage( UpdateManager& manager, ObjectOwnerContainer<T>& owner, T& object )
+inline void RemoveRendererMessage( UpdateManager& manager, Renderer& object )
 {
-  typedef MessageValue1< ObjectOwnerContainer<T>, T* > LocalType;
+  typedef MessageValue1< UpdateManager, Renderer* > 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( &owner, &ObjectOwnerContainer<T>::Remove, &object );
+  new (slot) LocalType( &manager, &UpdateManager::RemoveRenderer, &object );
 }
 
 // The render thread can safely change the Shader
@@ -957,7 +1001,8 @@ inline void RemoveTextureSetMessage( UpdateManager& manager, TextureSet& texture
 
 inline void AddSamplerMessage( UpdateManager& manager, Render::Sampler& sampler )
 {
-  typedef MessageValue1< UpdateManager, Render::Sampler* > LocalType;
+  // Message has ownership of Sampler while in transit from event -> update
+  typedef MessageValue1< UpdateManager, OwnerPointer< Render::Sampler > > LocalType;
 
   // Reserve some memory inside the message queue
   unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
@@ -988,20 +1033,21 @@ inline void SetFilterModeMessage( UpdateManager& manager, Render::Sampler& sampl
   new (slot) LocalType( &manager, &UpdateManager::SetFilterMode, &sampler, minFilterMode, magFilterMode );
 }
 
-inline void SetWrapModeMessage( UpdateManager& manager, Render::Sampler& sampler, unsigned int uWrapMode, unsigned int vWrapMode )
+inline void SetWrapModeMessage( UpdateManager& manager, Render::Sampler& sampler, unsigned int rWrapMode, unsigned int sWrapMode, unsigned int tWrapMode )
 {
-  typedef MessageValue3< UpdateManager, Render::Sampler*, unsigned int, unsigned int  > LocalType;
+  typedef MessageValue4< UpdateManager, Render::Sampler*, unsigned int, unsigned int, unsigned int > 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::SetWrapMode, &sampler, uWrapMode, vWrapMode );
+  new (slot) LocalType( &manager, &UpdateManager::SetWrapMode, &sampler, rWrapMode, sWrapMode, tWrapMode );
 }
 
 inline void AddPropertyBuffer( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer )
 {
-  typedef MessageValue1< UpdateManager, Render::PropertyBuffer*  > LocalType;
+  // Message has ownership of propertyBuffer while in transit from event -> update
+  typedef MessageValue1< UpdateManager, OwnerPointer< Render::PropertyBuffer > > LocalType;
 
   // Reserve some memory inside the message queue
   unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
@@ -1023,7 +1069,8 @@ inline void RemovePropertyBuffer( UpdateManager& manager, Render::PropertyBuffer
 
 inline void SetPropertyBufferFormat( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, Render::PropertyBuffer::Format* format )
 {
-  typedef MessageValue2< UpdateManager, Render::PropertyBuffer*, Render::PropertyBuffer::Format*  > LocalType;
+  // Message has ownership of PropertyBuffer::Format while in transit from event -> update
+  typedef MessageValue2< UpdateManager, Render::PropertyBuffer*, OwnerPointer< Render::PropertyBuffer::Format> > LocalType;
 
   // Reserve some memory inside the message queue
   unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
@@ -1034,7 +1081,8 @@ inline void SetPropertyBufferFormat( UpdateManager& manager, Render::PropertyBuf
 
 inline void SetPropertyBufferData( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, Vector<char>* data, size_t size )
 {
-  typedef MessageValue3< UpdateManager, Render::PropertyBuffer*, Vector<char>*, size_t  > LocalType;
+  // Message has ownership of PropertyBuffer data while in transit from event -> update
+  typedef MessageValue3< UpdateManager, Render::PropertyBuffer*, OwnerPointer< Vector<char> >, size_t  > LocalType;
 
   // Reserve some memory inside the message queue
   unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
@@ -1045,7 +1093,8 @@ inline void SetPropertyBufferData( UpdateManager& manager, Render::PropertyBuffe
 
 inline void AddGeometry( UpdateManager& manager, Render::Geometry& geometry )
 {
-  typedef MessageValue1< UpdateManager, Render::Geometry*  > LocalType;
+  // Message has ownership of Geometry while in transit from event -> update
+  typedef MessageValue1< UpdateManager, OwnerPointer< Render::Geometry > > LocalType;
 
   // Reserve some memory inside the message queue
   unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
@@ -1149,10 +1198,101 @@ inline void SetGeometryTypeMessage( UpdateManager& manager, Render::Geometry& ge
   new (slot) LocalType( &manager, &UpdateManager::SetGeometryType, &geometry, geometryType );
 }
 
+inline void AddTexture( UpdateManager& manager, Render::Texture& texture )
+{
+  // Message has ownership of Texture while in transit from event -> update
+  typedef MessageValue1< UpdateManager, OwnerPointer< Render::Texture > > 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::AddTexture, &texture );
+}
+
+inline void RemoveTexture( UpdateManager& manager, Render::Texture& texture )
+{
+  typedef MessageValue1< UpdateManager, Render::Texture*  > 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::RemoveTexture, &texture );
+}
+
+inline void UploadTextureMessage( UpdateManager& manager, Render::Texture& texture, PixelDataPtr pixelData, const Texture::UploadParams& params )
+{
+  typedef MessageValue3< UpdateManager, Render::Texture*, PixelDataPtr, Texture::UploadParams > 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::UploadTexture, &texture, pixelData, params );
+}
+
+inline void GenerateMipmapsMessage( UpdateManager& manager, Render::Texture& texture )
+{
+  typedef MessageValue1< UpdateManager, Render::Texture*  > 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::GenerateMipmaps, &texture );
+}
+
+
+inline void AddFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer )
+{
+  typedef MessageValue1< UpdateManager, Render::FrameBuffer*  > 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::AddFrameBuffer, &frameBuffer );
+}
+
+inline void RemoveFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer )
+{
+  typedef MessageValue1< UpdateManager, Render::FrameBuffer*  > 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::RemoveFrameBuffer, &frameBuffer );
+}
+
+inline void AttachColorTextureToFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer, Render::Texture* texture, unsigned int mipmapLevel, unsigned int layer )
+{
+  typedef MessageValue4< UpdateManager, Render::FrameBuffer*, Render::Texture*, unsigned int, unsigned int  > 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::AttachColorTextureToFrameBuffer, &frameBuffer, texture, mipmapLevel, layer );
+}
+
+inline void SetDepthIndicesMessage( UpdateManager& manager, NodeDepths* nodeDepths )
+{
+  typedef MessageValue1< UpdateManager, OwnerPointer< NodeDepths > > 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::SetDepthIndices, nodeDepths );
+}
+
+
 } // namespace SceneGraph
 
 } // namespace Internal
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_SCENE_GRAPH_UPDATE_MANAGER_H__
+#endif // DALI_INTERNAL_SCENE_GRAPH_UPDATE_MANAGER_H