1 #ifndef DALI_INTERNAL_SCENE_GRAPH_UPDATE_MANAGER_H
2 #define DALI_INTERNAL_SCENE_GRAPH_UPDATE_MANAGER_H
5 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/common/vector-wrapper.h>
23 #include <dali/public-api/common/dali-common.h>
25 #include <dali/devel-api/common/stage-devel.h>
27 #include <dali/internal/common/message.h>
28 #include <dali/internal/common/type-abstraction-enums.h>
29 #include <dali/internal/common/shader-saver.h>
30 #include <dali/internal/event/common/event-thread-services.h>
31 #include <dali/internal/update/animation/scene-graph-animation.h>
32 #include <dali/internal/update/common/property-resetter.h>
33 #include <dali/internal/update/common/scene-graph-buffers.h>
34 #include <dali/internal/update/common/scene-graph-property-notification.h>
35 #include <dali/internal/update/nodes/node.h>
36 #include <dali/internal/update/nodes/scene-graph-layer.h>
37 #include <dali/internal/update/rendering/scene-graph-renderer.h> // for OwnerPointer< Renderer >
38 #include <dali/internal/update/rendering/scene-graph-texture-set.h> // for OwnerPointer< TextureSet >
39 #include <dali/internal/update/gestures/scene-graph-pan-gesture.h>
40 #include <dali/internal/update/render-tasks/scene-graph-camera.h>
41 #include <dali/internal/render/shaders/scene-graph-shader.h> // for OwnerPointer< Shader >
42 #include <dali/internal/render/renderers/render-property-buffer.h>
43 #include <dali/internal/event/rendering/texture-impl.h>
50 class GlSyncAbstraction;
51 class RenderController;
53 } // namespace Integration
58 class PropertyNotifier;
59 class NotificationManager;
60 class CompleteNotificationInterface;
68 // value types used by messages
69 template <> struct ParameterType< PropertyNotification::NotifyMode >
70 : public BasicType< PropertyNotification::NotifyMode > {};
79 class RenderTaskProcessor;
85 SceneGraph::Node* node;
87 NodeDepthPair( SceneGraph::Node* node, uint32_t sortedDepth )
89 sortedDepth(sortedDepth)
100 void Add( SceneGraph::Node* node, uint32_t sortedDepth )
102 nodeDepths.push_back( NodeDepthPair( node, sortedDepth ) );
105 std::vector<NodeDepthPair> nodeDepths;
110 * UpdateManager maintains a scene graph i.e. a tree of nodes as well as
111 * other scene graph property owning objects.
112 * It controls the Update traversal, in which nodes are repositioned/animated,
113 * and organizes the the culling and rendering of the scene.
114 * It also maintains the lifecycle of nodes and other property owners that are
115 * disconnected from the scene graph.
117 class UpdateManager : public ShaderSaver
122 * Construct a new UpdateManager.
123 * @param[in] notificationManager This should be notified when animations have finished.
124 * @param[in] animationPlaylist The CompleteNotificationInterface that handles the animations
125 * @param[in] propertyNotifier The PropertyNotifier
126 * @param[in] discardQueue Nodes are added here when disconnected from the scene-graph.
127 * @param[in] controller After messages are flushed, we request a render from the RenderController.
128 * @param[in] renderManager This is responsible for rendering the results of each "update".
129 * @param[in] renderQueue Used to queue messages for the next render.
130 * @param[in] renderTaskProcessor Handles RenderTasks and RenderInstrucitons.
132 UpdateManager( NotificationManager& notificationManager,
133 CompleteNotificationInterface& animationPlaylist,
134 PropertyNotifier& propertyNotifier,
135 DiscardQueue& discardQueue,
136 Integration::RenderController& controller,
137 RenderManager& renderManager,
138 RenderQueue& renderQueue,
139 RenderTaskProcessor& renderTaskProcessor );
144 virtual ~UpdateManager();
146 // Node connection methods
149 * Installs a new layer as the root node.
150 * @pre The UpdateManager does not already have an installed root node.
151 * @pre The layer is of derived Node type Layer.
152 * @pre The layer does not have a parent.
153 * @param[in] layer The new root node.
154 * @param[in] systemLevel True if using the system-level overlay.
155 * @post The node is owned by UpdateManager.
157 void InstallRoot( OwnerPointer<Layer>& layer, bool systemLevel );
160 * Add a Node; UpdateManager takes ownership.
161 * @pre The node does not have a parent.
162 * @note even though nodes are pool allocated, they also contain other heap allocated data, thus using OwnerPointer when transferring the data
163 * @param[in] node The node to add.
165 void AddNode( OwnerPointer<Node>& node );
168 * Connect a Node to the scene-graph.
169 * A disconnected Node has has no parent or children, and its properties cannot be animated/constrained.
170 * @pre The node does not already have a parent.
171 * @param[in] parent The new parent node.
173 void ConnectNode( Node* parent, Node* node );
176 * Disconnect a Node from the scene-graph.
177 * A disconnected Node has has no parent or children, and its properties cannot be animated/constrained.
178 * @pre The node has a parent.
179 * @param[in] node The node to disconnect.
181 void DisconnectNode( Node* node );
184 * Destroy a Node owned by UpdateManager.
185 * This is not immediate; Nodes are passed to the RenderQueue to allow GL resources to be deleted.
186 * In the following update, the previously queued Nodes may be deleted.
187 * @pre The node has been disconnected from the scene-graph i.e. has no parent or children.
188 * @param[in] node The node to destroy.
190 void DestroyNode( Node* node );
193 * Add a camera on scene
194 * @param[in] camera The camera to add
196 void AddCamera( OwnerPointer< Camera >& camera );
199 * Remove a camera from scene
200 * @param[in] camera to remove
202 void RemoveCamera( const Camera* camera );
205 * Add a newly created object.
206 * @param[in] object The object to add.
207 * @post The object is owned by UpdateManager.
209 void AddObject( OwnerPointer<PropertyOwner>& object );
213 * @param[in] object The object to remove.
215 void RemoveObject( PropertyOwner* object );
220 * Add a newly created animation.
221 * @param[in] animation The animation to add.
222 * @post The animation is owned by UpdateManager.
224 void AddAnimation( OwnerPointer< SceneGraph::Animation >& animation );
228 * @param[in] animation The animation to stop.
230 void StopAnimation( Animation* animation );
233 * Remove an animation.
234 * @param[in] animation The animation to remove.
236 void RemoveAnimation( Animation* animation );
239 * Query whether any animations are currently running.
240 * @return True if any animations are running.
242 bool IsAnimationRunning() const;
245 * Add a property resetter. UpdateManager takes ownership of the object.
246 * It will be killed by UpdateManager when the associated animator or
247 * constraint has finished; or the property owner of the property is destroyed.
249 void AddPropertyResetter( OwnerPointer<PropertyResetterBase>& propertyResetter );
251 // Property Notification
254 * Add a newly created property notification
255 * @param[in] propertyNotification The notification to add
256 * @post The propertyNotification is owned by UpdateManager.
258 void AddPropertyNotification( OwnerPointer< PropertyNotification >& propertyNotification );
261 * Remove a property notification
262 * @param[in] propertyNotification The notification to remove
264 void RemovePropertyNotification( PropertyNotification* propertyNotification );
267 * Set Notify state for PropertyNotification
268 * @param[in] propertyNotification The notification to remove
269 * @param[in] notifyMode The notification mode.
271 void PropertyNotificationSetNotify( PropertyNotification* propertyNotification, PropertyNotification::NotifyMode notifyMode );
276 * Add a newly created shader.
277 * @param[in] shader The shader to add.
278 * @post The shader is owned by the UpdateManager.
280 void AddShader( OwnerPointer< Shader >& shader );
284 * @pre The shader has been added to the UpdateManager.
285 * @param[in] shader The shader to remove.
286 * @post The shader is destroyed.
288 void RemoveShader( Shader* shader );
291 * Set the shader program for a Shader object
292 * @param[in] shader The shader to modify
293 * @param[in] shaderData Source code, hash over source, and optional compiled binary for the shader program
294 * @param[in] modifiesGeometry True if the vertex shader modifies geometry
296 void SetShaderProgram( Shader* shader, Internal::ShaderDataPtr shaderData, bool modifiesGeometry );
299 * @brief Accept compiled shaders passed back on render thread for saving.
300 * @param[in] shaderData Source code, hash over source, and corresponding compiled binary to be saved.
302 virtual void SaveBinary( Internal::ShaderDataPtr shaderData );
305 * @brief Set the destination for compiled shader binaries to be passed on to.
306 * The dispatcher passed in will be called from the update thread.
307 * @param[in] upstream A sink for ShaderDatas to be passed into.
309 void SetShaderSaver( ShaderSaver& upstream );
314 * Add a new renderer to scene
315 * @param renderer to add
317 void AddRenderer( OwnerPointer< Renderer >& renderer );
320 * Add a renderer from scene
321 * @param renderer to remove
323 void RemoveRenderer( Renderer* renderer );
328 * Set the pan gesture processor.
329 * Pan Gesture processor lives for the lifetime of UpdateManager
330 * @param[in] gesture The gesture processor.
331 * @post The gestureProcessor is owned by the UpdateManager.
333 void SetPanGestureProcessor( PanGesture* gestureProcessor );
338 * Add a newly created TextureSet.
339 * @param[in] textureSet The texture set to add.
340 * @post The TextureSet is owned by the UpdateManager.
342 void AddTextureSet( OwnerPointer< TextureSet >& textureSet );
345 * Remove a TextureSet.
346 * @pre The TextureSet has been added to the UpdateManager.
347 * @param[in] textureSet The TextureSet to remove.
348 * @post The TextureSet is destroyed.
350 void RemoveTextureSet( TextureSet* textureSet );
355 * Get the scene graph side list of RenderTasks.
356 * @param[in] systemLevel True if using the system-level overlay.
357 * @return The list of render tasks
359 RenderTaskList* GetRenderTaskList( bool systemLevel );
361 // Message queue handling
364 * Reserve space for another message in the queue; this must then be initialized by the caller.
365 * The message will be read from the update-thread after the next FlushMessages is called.
366 * @post Calling this method may invalidate any previously returned slots.
367 * @param[in] size The message size with respect to the size of type "char".
368 * @param[in] updateScene A flag, when true denotes that the message will cause the scene-graph node tree to require an update.
369 * @note the default value of updateScene should match that in EventThreadServices::ReserveMessageSlot.
370 * @return A pointer to the first char allocated for the message.
372 unsigned int* ReserveMessageSlot( std::size_t size, bool updateScene = true );
375 * @return the current event-buffer index.
377 BufferIndex GetEventBufferIndex() const
379 // inlined as its called often from event thread
380 return mSceneGraphBuffers.GetEventBufferIndex();
384 * Called by the event-thread to signal that FlushQueue will be called
385 * e.g. when it has finished event processing.
387 void EventProcessingStarted();
390 * Flush the set of messages, which were previously stored with QueueMessage().
391 * Calls to this thread-safe method should be minimized, to avoid thread blocking.
393 * @return True if there are messages to process.
398 * Add a new sampler to RenderManager
399 * @param[in] sampler The sampler to add
400 * @post Sends a message to RenderManager to add the sampler.
401 * The sampler will be owned by RenderManager
403 void AddSampler( OwnerPointer< Render::Sampler >& sampler );
406 * Removes an existing sampler from RenderManager
407 * @param[in] sampler The sampler to remove
408 * @post The sampler will be destroyed in the render thread
410 void RemoveSampler( Render::Sampler* sampler );
413 * Sets the filter modes for an existing sampler
414 * @param[in] sampler The sampler
415 * @param[in] minFilterMode The filter to use under minification
416 * @param[in] magFilterMode The filter to use under magnification
418 void SetFilterMode( Render::Sampler* sampler, unsigned int minFilterMode, unsigned int magFilterMode );
421 * Sets the wrap mode for an existing sampler
422 * @param[in] sampler The sampler
423 * @param[in] rWrapMode Wrapping mode in z direction
424 * @param[in] sWrapMode Wrapping mode in x direction
425 * @param[in] tWrapMode Wrapping mode in y direction
427 void SetWrapMode( Render::Sampler* sampler, unsigned int rWrapMode, unsigned int sWrapMode, unsigned int tWrapMode );
430 * Add a new property buffer to RenderManager
431 * @param[in] propertryBuffer The property buffer to add
432 * @post Sends a message to RenderManager to add the property buffer.
433 * The property buffer will be owned by RenderManager
435 void AddPropertyBuffer( OwnerPointer< Render::PropertyBuffer >& propertryBuffer );
438 * Removes an existing PropertyBuffer from RenderManager
439 * @param[in] propertryBuffer The property buffer to remove
440 * @post The property buffer will be destroyed in the render thread
442 void RemovePropertyBuffer( Render::PropertyBuffer* propertryBuffer );
445 * Sets the format of an existing property buffer
446 * @param[in] propertyBuffer The property buffer.
447 * @param[in] format The new format of the buffer
448 * @post Sends a message to RenderManager to set the new format to the property buffer.
450 void SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format );
453 * Sets the data of an existing property buffer
454 * @param[in] propertyBuffer The property buffer.
455 * @param[in] data The new data of the buffer
456 * @param[in] size The new size of the buffer
457 * @post Sends a message to RenderManager to set the new data to the property buffer.
459 void SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Vector<char> >& data, size_t size );
462 * Adds a geometry to the RenderManager
463 * @param[in] geometry The geometry to add
464 * @post Sends a message to RenderManager to add the Geometry
465 * The geometry will be owned by RenderManager
467 void AddGeometry( OwnerPointer< Render::Geometry >& geometry );
470 * Removes an existing Geometry from RenderManager
471 * @param[in] geometry The geometry to remove
472 * @post The geometry will be destroyed in the render thread
474 void RemoveGeometry( Render::Geometry* geometry );
477 * Sets the geometry type of an existing Geometry
478 * @param[in] geometry The geometry
479 * @param[in] geometryType The type of the geometry
481 void SetGeometryType( Render::Geometry* geometry, unsigned int geometryType );
484 * Sets the index buffer to be used by a geometry
485 * @param[in] geometry The geometry
486 * @param[in] indices A vector containing the indices for the geometry
488 void SetIndexBuffer( Render::Geometry* geometry, Dali::Vector<unsigned short>& indices );
491 * Adds a vertex buffer to a geometry
492 * @param[in] geometry The geometry
493 * @param[in] propertyBuffer The property buffer
495 void AttachVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
498 * Removes a vertex buffer from a geometry
499 * @param[in] geometry The geometry
500 * @param[in] propertyBuffer The property buffer
502 void RemoveVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
505 * Adds a texture to the render manager
506 * @param[in] texture The texture to add
507 * The texture will be owned by RenderManager
509 void AddTexture( OwnerPointer< Render::Texture >& texture );
512 * Removes a texture from the render manager
513 * @param[in] texture The texture to remove
514 * @post The texture will be destroyed in the render thread
516 void RemoveTexture( Render::Texture* texture );
519 * Uploads data to a texture owned by the RenderManager
520 * @param[in] texture The texture
521 * @param[in] pixelData The pixel data object
522 * @param[in] params The parameters for the upload
524 void UploadTexture( Render::Texture* texture, PixelDataPtr pixelData, const Texture::UploadParams& params );
527 * Generates mipmaps for a texture owned by the RenderManager
528 * @param[in] texture The texture
530 void GenerateMipmaps( Render::Texture* texture );
533 * Adds a framebuffer to the render manager
534 * @param[in] frameBuffer The framebuffer to add
535 * The framebuffer will be owned by RenderManager
537 void AddFrameBuffer( Render::FrameBuffer* frameBuffer );
540 * Removes a FrameBuffer from the render manager
541 * @param[in] frameBuffer The FrameBuffer to remove
542 * @post The FrameBuffer will be destroyed in the render thread
544 void RemoveFrameBuffer( Render::FrameBuffer* frameBuffer );
547 * Attach a texture as color output to an existing FrameBuffer
548 * @param[in] frameBuffer The FrameBuffer
549 * @param[in] texture The texture that will be used as output when rendering
550 * @param[in] mipmapLevel The mipmap of the texture to be attached
551 * @param[in] layer Indicates which layer of a cube map or array texture to attach. Unused for 2D textures
553 void AttachColorTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, unsigned int mipmapLevel, unsigned int face );
558 * Performs an Update traversal on the scene-graph.
559 * @param[in] elapsedSeconds The elapsed time that should be applied to animations.
560 * @param[in] lastVSyncTimeMilliseconds The last time, in milliseconds, that we had a VSync.
561 * @param[in] nextVSyncTimeMilliseconds The estimated time, in milliseconds, of the next VSync.
562 * @param[in] renderToFboEnabled Whether rendering into the Frame Buffer Object is enabled.
563 * @param[in] isRenderingToFbo Whether this frame is being rendered into the Frame Buffer Object.
564 * @return True if further updates are required e.g. during animations.
566 unsigned int Update( float elapsedSeconds,
567 unsigned int lastVSyncTimeMilliseconds,
568 unsigned int nextVSyncTimeMilliseconds,
569 bool renderToFboEnabled,
570 bool isRenderingToFbo );
573 * Set the background color i.e. the glClear color used at the beginning of each frame.
574 * @param[in] color The new background color.
576 void SetBackgroundColor(const Vector4& color);
579 * Set the default surface rect.
580 * @param[in] rect The rect value representing the surface.
582 void SetDefaultSurfaceRect( const Rect<int>& rect );
585 * @copydoc Dali::Stage::KeepRendering()
587 void KeepRendering( float durationSeconds );
590 * @copydoc Dali::DevelStage::SetRenderingBehavior()
592 void SetRenderingBehavior( DevelStage::Rendering renderingBehavior );
595 * Sets the depths of all layers.
596 * @param layers The layers in depth order.
597 * @param[in] systemLevel True if using the system-level overlay.
599 void SetLayerDepths( const std::vector< Layer* >& layers, bool systemLevel );
602 * Set the depth indices of all nodes (in LayerUI's)
603 * @param[in] nodeDepths A vector of nodes and associated depth indices
605 void SetDepthIndices( OwnerPointer< NodeDepths >& nodeDepths );
608 * Query wheter the default surface rect is changed or not.
609 * @return true if the default surface rect is changed.
611 bool IsDefaultSurfaceRectChanged();
616 UpdateManager(const UpdateManager&);
619 UpdateManager& operator=(const UpdateManager& rhs);
622 * Helper to check whether the update-thread should keep going.
623 * @param[in] elapsedSeconds The time in seconds since the previous update.
624 * @return True if the update-thread should keep going.
626 unsigned int KeepUpdatingCheck( float elapsedSeconds ) const;
629 * Helper to reset all Node properties
630 * @param[in] bufferIndex to use
632 void ResetProperties( BufferIndex bufferIndex );
635 * Perform gesture updates.
636 * @param[in] bufferIndex to use
637 * @param[in] lastVSyncTime The last VSync time in milliseconds.
638 * @param[in] nextVSyncTime The estimated time of the next VSync in milliseconds.
639 * @return true, if any properties were updated.
641 bool ProcessGestures( BufferIndex bufferIndex, unsigned int lastVSyncTimeMilliseconds, unsigned int nextVSyncTimeMilliseconds );
644 * Perform animation updates
645 * @param[in] bufferIndex to use
646 * @param[in] elapsedSeconds time since last frame
648 void Animate( BufferIndex bufferIndex, float elapsedSeconds );
651 * Applies constraints to CustomObjects
652 * @param[in] bufferIndex to use
654 void ConstrainCustomObjects( BufferIndex bufferIndex );
657 * Applies constraints to RenderTasks
658 * @param[in] bufferIndex to use
660 void ConstrainRenderTasks( BufferIndex bufferIndex );
663 * Applies constraints to Shaders
664 * @param[in] bufferIndex to use
666 void ConstrainShaders( BufferIndex bufferIndex );
669 * Perform property notification updates
670 * @param[in] bufferIndex to use
672 void ProcessPropertyNotifications( BufferIndex bufferIndex );
675 * Pass shader binaries queued here on to event thread.
677 void ForwardCompiledShadersToEventThread();
680 * Update node shaders, opacity, geometry etc.
681 * @param[in] bufferIndex to use
683 void UpdateNodes( BufferIndex bufferIndex );
687 * @param[in] bufferIndex to use
689 void UpdateRenderers( BufferIndex bufferIndex );
693 // needs to be direct member so that getter for event buffer can be inlined
694 SceneGraphBuffers mSceneGraphBuffers;
701 // Messages for UpdateManager
703 inline void InstallRootMessage( UpdateManager& manager, OwnerPointer<Layer>& root, bool systemLevel )
705 // Message has ownership of Layer while in transit from event -> update
706 typedef MessageValue2< UpdateManager, OwnerPointer<Layer>, bool > LocalType;
708 // Reserve some memory inside the message queue
709 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
711 // Construct message in the message queue memory; note that delete should not be called on the return value
712 new (slot) LocalType( &manager, &UpdateManager::InstallRoot, root, systemLevel );
715 inline void AddNodeMessage( UpdateManager& manager, OwnerPointer<Node>& node )
717 // Message has ownership of Node while in transit from event -> update
718 typedef MessageValue1< UpdateManager, OwnerPointer<Node> > LocalType;
720 // Reserve some memory inside the message queue
721 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
723 // Construct message in the message queue memory; note that delete should not be called on the return value
724 new (slot) LocalType( &manager, &UpdateManager::AddNode, node );
727 inline void ConnectNodeMessage( UpdateManager& manager, const Node& constParent, const Node& constChild )
729 // Update thread can edit the object
730 Node& parent = const_cast< Node& >( constParent );
731 Node& child = const_cast< Node& >( constChild );
733 typedef MessageValue2< UpdateManager, Node*, Node* > LocalType;
735 // Reserve some memory inside the message queue
736 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
738 // Construct message in the message queue memory; note that delete should not be called on the return value
739 new (slot) LocalType( &manager, &UpdateManager::ConnectNode, &parent, &child );
742 inline void DisconnectNodeMessage( UpdateManager& manager, const Node& constNode )
744 // Scene graph thread can modify this object.
745 Node& node = const_cast< Node& >( constNode );
747 typedef MessageValue1< UpdateManager, Node* > LocalType;
749 // Reserve some memory inside the message queue
750 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
752 // Construct message in the message queue memory; note that delete should not be called on the return value
753 new (slot) LocalType( &manager, &UpdateManager::DisconnectNode, &node );
756 inline void DestroyNodeMessage( UpdateManager& manager, const Node& constNode )
758 // Scene graph thread can destroy this object.
759 Node& node = const_cast< Node& >( constNode );
761 typedef MessageValue1< UpdateManager, Node* > LocalType;
763 // Reserve some memory inside the message queue
764 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
766 // Construct message in the message queue memory; note that delete should not be called on the return value
767 new (slot) LocalType( &manager, &UpdateManager::DestroyNode, &node );
770 inline void AddCameraMessage( UpdateManager& manager, OwnerPointer< Camera >& camera )
772 // Message has ownership of Camera while in transit from event -> update
773 typedef MessageValue1< UpdateManager, OwnerPointer< Camera > > LocalType;
775 // Reserve some memory inside the message queue
776 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
778 // Construct message in the message queue memory; note that delete should not be called on the return value
779 new (slot) LocalType( &manager, &UpdateManager::AddCamera, camera );
782 inline void RemoveCameraMessage( UpdateManager& manager, const Camera* camera )
784 typedef MessageValue1< UpdateManager, const Camera* > LocalType;
786 // Reserve some memory inside the message queue
787 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
789 // Construct message in the message queue memory; note that delete should not be called on the return value
790 new (slot) LocalType( &manager, &UpdateManager::RemoveCamera, camera );
793 inline void AddObjectMessage( UpdateManager& manager, OwnerPointer<PropertyOwner>& object )
795 // Message has ownership of object while in transit from event -> update
796 typedef MessageValue1< UpdateManager, OwnerPointer<PropertyOwner> > LocalType;
798 // Reserve some memory inside the message queue
799 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
801 // Construct message in the message queue memory; note that delete should not be called on the return value
802 new (slot) LocalType( &manager, &UpdateManager::AddObject, object );
805 inline void RemoveObjectMessage( UpdateManager& manager, PropertyOwner* object )
807 typedef MessageValue1< UpdateManager, PropertyOwner* > LocalType;
809 // Reserve some memory inside the message queue
810 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
812 // Construct message in the message queue memory; note that delete should not be called on the return value
813 new (slot) LocalType( &manager, &UpdateManager::RemoveObject, object );
816 inline void AddAnimationMessage( UpdateManager& manager, OwnerPointer< SceneGraph::Animation >& animation )
818 typedef MessageValue1< UpdateManager, OwnerPointer< SceneGraph::Animation > > LocalType;
820 // Reserve some memory inside the message queue
821 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
823 // Construct message in the message queue memory; note that delete should not be called on the return value
824 new (slot) LocalType( &manager, &UpdateManager::AddAnimation, animation );
827 inline void StopAnimationMessage( UpdateManager& manager, const Animation& constAnimation )
829 // The scene-graph thread owns this object so it can safely edit it.
830 Animation& animation = const_cast< Animation& >( constAnimation );
832 typedef MessageValue1< UpdateManager, Animation* > LocalType;
834 // Reserve some memory inside the message queue
835 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
837 // Construct message in the message queue memory; note that delete should not be called on the return value
838 new (slot) LocalType( &manager, &UpdateManager::StopAnimation, &animation );
841 inline void RemoveAnimationMessage( UpdateManager& manager, const Animation& constAnimation )
843 // The scene-graph thread owns this object so it can safely edit it.
844 Animation& animation = const_cast< Animation& >( constAnimation );
846 typedef MessageValue1< UpdateManager, Animation* > LocalType;
848 // Reserve some memory inside the message queue
849 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
851 // Construct message in the message queue memory; note that delete should not be called on the return value
852 new (slot) LocalType( &manager, &UpdateManager::RemoveAnimation, &animation );
855 inline void AddPropertyNotificationMessage( UpdateManager& manager, OwnerPointer< PropertyNotification >& propertyNotification )
857 // Message has ownership of PropertyNotification while in transit from event -> update
858 typedef MessageValue1< UpdateManager, OwnerPointer< PropertyNotification > > LocalType;
860 // Reserve some memory inside the message queue
861 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
863 // Construct message in the message queue memory; note that delete should not be called on the return value
864 new (slot) LocalType( &manager, &UpdateManager::AddPropertyNotification, propertyNotification );
867 inline void RemovePropertyNotificationMessage( UpdateManager& manager, const PropertyNotification& constPropertyNotification )
869 // The scene-graph thread owns this object so it can safely edit it.
870 PropertyNotification& propertyNotification = const_cast< PropertyNotification& >( constPropertyNotification );
872 typedef MessageValue1< UpdateManager, PropertyNotification* > LocalType;
874 // Reserve some memory inside the message queue
875 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
877 // Construct message in the message queue memory; note that delete should not be called on the return value
878 new (slot) LocalType( &manager, &UpdateManager::RemovePropertyNotification, &propertyNotification );
881 inline void PropertyNotificationSetNotifyModeMessage( UpdateManager& manager,
882 const PropertyNotification* constPropertyNotification,
883 PropertyNotification::NotifyMode notifyMode )
885 // The scene-graph thread owns this object so it can safely edit it.
886 PropertyNotification* propertyNotification = const_cast< PropertyNotification* >( constPropertyNotification );
888 typedef MessageValue2< UpdateManager, PropertyNotification*, PropertyNotification::NotifyMode > LocalType;
890 // Reserve some memory inside the message queue
891 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
893 // Construct message in the message queue memory; note that delete should not be called on the return value
894 new (slot) LocalType( &manager, &UpdateManager::PropertyNotificationSetNotify, propertyNotification, notifyMode );
897 // The render thread can safely change the Shader
898 inline void AddShaderMessage( UpdateManager& manager, OwnerPointer< Shader >& shader )
900 typedef MessageValue1< UpdateManager, OwnerPointer< Shader > > LocalType;
902 // Reserve some memory inside the message queue
903 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
905 // Construct message in the message queue memory; note that delete should not be called on the return value
906 new (slot) LocalType( &manager, &UpdateManager::AddShader, shader );
909 // The render thread can safely change the Shader
910 inline void RemoveShaderMessage( UpdateManager& manager, Shader& shader )
912 typedef MessageValue1< UpdateManager, Shader* > LocalType;
914 // Reserve some memory inside the message queue
915 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
917 // Construct message in the message queue memory; note that delete should not be called on the return value
918 new (slot) LocalType( &manager, &UpdateManager::RemoveShader, &shader );
921 inline void SetShaderProgramMessage( UpdateManager& manager,
923 Internal::ShaderDataPtr shaderData,
924 bool modifiesGeometry )
926 typedef MessageValue3< UpdateManager, Shader*, Internal::ShaderDataPtr, bool > LocalType;
928 // Reserve some memory inside the message queue
929 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
931 // Construct message in the message queue memory; note that delete should not be called on the return value
932 new (slot) LocalType( &manager, &UpdateManager::SetShaderProgram, &shader, shaderData, modifiesGeometry );
935 inline void SetBackgroundColorMessage( UpdateManager& manager, const Vector4& color )
937 typedef MessageValue1< UpdateManager, Vector4 > LocalType;
939 // Reserve some memory inside the message queue
940 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
942 // Construct message in the message queue memory; note that delete should not be called on the return value
943 new (slot) LocalType( &manager, &UpdateManager::SetBackgroundColor, color );
946 inline void SetDefaultSurfaceRectMessage( UpdateManager& manager, const Rect<int>& rect )
948 typedef MessageValue1< UpdateManager, Rect<int> > LocalType;
950 // Reserve some memory inside the message queue
951 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
953 // Construct message in the message queue memory; note that delete should not be called on the return value
954 new (slot) LocalType( &manager, &UpdateManager::SetDefaultSurfaceRect, rect );
957 inline void KeepRenderingMessage( UpdateManager& manager, float durationSeconds )
959 typedef MessageValue1< UpdateManager, float > LocalType;
961 // Reserve some memory inside the message queue
962 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
964 // Construct message in the message queue memory; note that delete should not be called on the return value
965 new (slot) LocalType( &manager, &UpdateManager::KeepRendering, durationSeconds );
968 inline void SetRenderingBehaviorMessage( UpdateManager& manager, DevelStage::Rendering renderingBehavior )
970 typedef MessageValue1< UpdateManager, DevelStage::Rendering > LocalType;
972 // Reserve some memory inside the message queue
973 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
975 // Construct message in the message queue memory; note that delete should not be called on the return value
976 new (slot) LocalType( &manager, &UpdateManager::SetRenderingBehavior, renderingBehavior );
980 * Create a message for setting the depth of a layer
981 * @param[in] manager The update manager
982 * @param[in] layers list of layers
983 * @param[in] systemLevel True if the layers are added via the SystemOverlay API
985 inline void SetLayerDepthsMessage( UpdateManager& manager, const std::vector< Layer* >& layers, bool systemLevel )
987 typedef MessageValue2< UpdateManager, std::vector< Layer* >, bool > LocalType;
989 // Reserve some memory inside the message queue
990 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
992 // Construct message in the message queue memory; note that delete should not be called on the return value
993 new (slot) LocalType( &manager, &UpdateManager::SetLayerDepths, layers, systemLevel );
996 inline void AddRendererMessage( UpdateManager& manager, OwnerPointer< Renderer >& object )
998 typedef MessageValue1< UpdateManager, OwnerPointer< Renderer > > LocalType;
1000 // Reserve some memory inside the message queue
1001 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1002 // Construct message in the message queue memory; note that delete should not be called on the return value
1003 new (slot) LocalType( &manager, &UpdateManager::AddRenderer, object );
1006 inline void RemoveRendererMessage( UpdateManager& manager, Renderer& object )
1008 typedef MessageValue1< UpdateManager, Renderer* > LocalType;
1010 // Reserve some memory inside the message queue
1011 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1012 // Construct message in the message queue memory; note that delete should not be called on the return value
1013 new (slot) LocalType( &manager, &UpdateManager::RemoveRenderer, &object );
1016 // The render thread can safely change the Shader
1017 inline void AddTextureSetMessage( UpdateManager& manager, OwnerPointer< TextureSet >& textureSet )
1019 typedef MessageValue1< UpdateManager, OwnerPointer< TextureSet > > LocalType;
1021 // Reserve some memory inside the message queue
1022 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1024 // Construct message in the message queue memory; note that delete should not be called on the return value
1025 new (slot) LocalType( &manager, &UpdateManager::AddTextureSet, textureSet );
1028 // The render thread can safely change the Shader
1029 inline void RemoveTextureSetMessage( UpdateManager& manager, TextureSet& textureSet )
1031 typedef MessageValue1< UpdateManager, TextureSet* > LocalType;
1033 // Reserve some memory inside the message queue
1034 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1036 // Construct message in the message queue memory; note that delete should not be called on the return value
1037 new (slot) LocalType( &manager, &UpdateManager::RemoveTextureSet, &textureSet );
1040 inline void AddSamplerMessage( UpdateManager& manager, OwnerPointer< Render::Sampler >& sampler )
1042 // Message has ownership of Sampler while in transit from event -> update
1043 typedef MessageValue1< UpdateManager, OwnerPointer< Render::Sampler > > LocalType;
1045 // Reserve some memory inside the message queue
1046 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1048 // Construct message in the message queue memory; note that delete should not be called on the return value
1049 new (slot) LocalType( &manager, &UpdateManager::AddSampler, sampler );
1052 inline void RemoveSamplerMessage( UpdateManager& manager, Render::Sampler& sampler )
1054 typedef MessageValue1< UpdateManager, Render::Sampler* > LocalType;
1056 // Reserve some memory inside the message queue
1057 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1059 // Construct message in the message queue memory; note that delete should not be called on the return value
1060 new (slot) LocalType( &manager, &UpdateManager::RemoveSampler, &sampler );
1063 inline void SetFilterModeMessage( UpdateManager& manager, Render::Sampler& sampler, unsigned int minFilterMode, unsigned int magFilterMode )
1065 typedef MessageValue3< UpdateManager, Render::Sampler*, unsigned int, unsigned int > LocalType;
1067 // Reserve some memory inside the message queue
1068 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1070 // Construct message in the message queue memory; note that delete should not be called on the return value
1071 new (slot) LocalType( &manager, &UpdateManager::SetFilterMode, &sampler, minFilterMode, magFilterMode );
1074 inline void SetWrapModeMessage( UpdateManager& manager, Render::Sampler& sampler, unsigned int rWrapMode, unsigned int sWrapMode, unsigned int tWrapMode )
1076 typedef MessageValue4< UpdateManager, Render::Sampler*, unsigned int, unsigned int, unsigned int > LocalType;
1078 // Reserve some memory inside the message queue
1079 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1081 // Construct message in the message queue memory; note that delete should not be called on the return value
1082 new (slot) LocalType( &manager, &UpdateManager::SetWrapMode, &sampler, rWrapMode, sWrapMode, tWrapMode );
1085 inline void AddPropertyBuffer( UpdateManager& manager, OwnerPointer< Render::PropertyBuffer >& propertyBuffer )
1087 // Message has ownership of propertyBuffer while in transit from event -> update
1088 typedef MessageValue1< UpdateManager, OwnerPointer< Render::PropertyBuffer > > LocalType;
1090 // Reserve some memory inside the message queue
1091 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1093 // Construct message in the message queue memory; note that delete should not be called on the return value
1094 new (slot) LocalType( &manager, &UpdateManager::AddPropertyBuffer, propertyBuffer );
1097 inline void RemovePropertyBuffer( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer )
1099 typedef MessageValue1< UpdateManager, Render::PropertyBuffer* > LocalType;
1101 // Reserve some memory inside the message queue
1102 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1104 // Construct message in the message queue memory; note that delete should not be called on the return value
1105 new (slot) LocalType( &manager, &UpdateManager::RemovePropertyBuffer, &propertyBuffer );
1108 inline void SetPropertyBufferFormat( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format )
1110 // Message has ownership of PropertyBuffer::Format while in transit from event -> update
1111 typedef MessageValue2< UpdateManager, Render::PropertyBuffer*, OwnerPointer< Render::PropertyBuffer::Format> > LocalType;
1113 // Reserve some memory inside the message queue
1114 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1116 // Construct message in the message queue memory; note that delete should not be called on the return value
1117 new (slot) LocalType( &manager, &UpdateManager::SetPropertyBufferFormat, &propertyBuffer, format );
1120 inline void SetPropertyBufferData( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, OwnerPointer< Vector<char> >& data, size_t size )
1122 // Message has ownership of PropertyBuffer data while in transit from event -> update
1123 typedef MessageValue3< UpdateManager, Render::PropertyBuffer*, OwnerPointer< Vector<char> >, size_t > LocalType;
1125 // Reserve some memory inside the message queue
1126 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1128 // Construct message in the message queue memory; note that delete should not be called on the return value
1129 new (slot) LocalType( &manager, &UpdateManager::SetPropertyBufferData, &propertyBuffer, data, size );
1132 inline void AddGeometry( UpdateManager& manager, OwnerPointer< Render::Geometry >& geometry )
1134 // Message has ownership of Geometry while in transit from event -> update
1135 typedef MessageValue1< UpdateManager, OwnerPointer< Render::Geometry > > LocalType;
1137 // Reserve some memory inside the message queue
1138 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1140 // Construct message in the message queue memory; note that delete should not be called on the return value
1141 new (slot) LocalType( &manager, &UpdateManager::AddGeometry, geometry );
1144 inline void RemoveGeometry( UpdateManager& manager, Render::Geometry& geometry )
1146 typedef MessageValue1< UpdateManager, Render::Geometry* > LocalType;
1148 // Reserve some memory inside the message queue
1149 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1151 // Construct message in the message queue memory; note that delete should not be called on the return value
1152 new (slot) LocalType( &manager, &UpdateManager::RemoveGeometry, &geometry );
1155 inline void AttachVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::PropertyBuffer& vertexBuffer )
1157 typedef MessageValue2< UpdateManager, Render::Geometry*, Render::PropertyBuffer* > LocalType;
1159 // Reserve some memory inside the message queue
1160 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1162 // Construct message in the message queue memory; note that delete should not be called on the return value
1163 new (slot) LocalType( &manager, &UpdateManager::AttachVertexBuffer, &geometry, const_cast<Render::PropertyBuffer*>(&vertexBuffer) );
1166 inline void RemoveVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::PropertyBuffer& vertexBuffer )
1168 typedef MessageValue2< UpdateManager, Render::Geometry*, Render::PropertyBuffer* > LocalType;
1170 // Reserve some memory inside the message queue
1171 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1173 // Construct message in the message queue memory; note that delete should not be called on the return value
1174 new (slot) LocalType( &manager, &UpdateManager::RemoveVertexBuffer, &geometry, const_cast<Render::PropertyBuffer*>(&vertexBuffer) );
1177 // Custom message type for SetIndexBuffer() used to move data with Vector::Swap()
1178 template< typename T >
1179 class IndexBufferMessage : public MessageBase
1184 * Constructor which does a Vector::Swap()
1186 IndexBufferMessage( T* manager, Render::Geometry* geometry, Dali::Vector<unsigned short>& indices )
1188 mManager( manager ),
1189 mRenderGeometry( geometry )
1191 mIndices.Swap( indices );
1195 * Virtual destructor
1197 virtual ~IndexBufferMessage()
1202 * @copydoc MessageBase::Process
1204 virtual void Process( BufferIndex /*bufferIndex*/ )
1206 DALI_ASSERT_DEBUG( mManager && "Message does not have an object" );
1207 mManager->SetIndexBuffer( mRenderGeometry, mIndices );
1213 Render::Geometry* mRenderGeometry;
1214 Dali::Vector<unsigned short> mIndices;
1217 inline void SetIndexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, Dali::Vector<unsigned short>& indices )
1219 typedef IndexBufferMessage< UpdateManager > LocalType;
1221 // Reserve some memory inside the message queue
1222 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1224 // Construct message in the message queue memory; note that delete should not be called on the return value
1225 new (slot) LocalType( &manager, &geometry, indices );
1228 inline void SetGeometryTypeMessage( UpdateManager& manager, Render::Geometry& geometry, unsigned int geometryType )
1230 typedef MessageValue2< UpdateManager, Render::Geometry*, unsigned int > LocalType;
1232 // Reserve some memory inside the message queue
1233 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1235 // Construct message in the message queue memory; note that delete should not be called on the return value
1236 new (slot) LocalType( &manager, &UpdateManager::SetGeometryType, &geometry, geometryType );
1239 inline void AddTexture( UpdateManager& manager, OwnerPointer< Render::Texture >& texture )
1241 // Message has ownership of Texture while in transit from event -> update
1242 typedef MessageValue1< UpdateManager, OwnerPointer< Render::Texture > > LocalType;
1244 // Reserve some memory inside the message queue
1245 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1247 // Construct message in the message queue memory; note that delete should not be called on the return value
1248 new (slot) LocalType( &manager, &UpdateManager::AddTexture, texture );
1251 inline void RemoveTexture( UpdateManager& manager, Render::Texture& texture )
1253 typedef MessageValue1< UpdateManager, Render::Texture* > LocalType;
1255 // Reserve some memory inside the message queue
1256 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1258 // Construct message in the message queue memory; note that delete should not be called on the return value
1259 new (slot) LocalType( &manager, &UpdateManager::RemoveTexture, &texture );
1262 inline void UploadTextureMessage( UpdateManager& manager, Render::Texture& texture, PixelDataPtr pixelData, const Texture::UploadParams& params )
1264 typedef MessageValue3< UpdateManager, Render::Texture*, PixelDataPtr, Texture::UploadParams > LocalType;
1266 // Reserve some memory inside the message queue
1267 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1269 // Construct message in the message queue memory; note that delete should not be called on the return value
1270 new (slot) LocalType( &manager, &UpdateManager::UploadTexture, &texture, pixelData, params );
1273 inline void GenerateMipmapsMessage( UpdateManager& manager, Render::Texture& texture )
1275 typedef MessageValue1< UpdateManager, Render::Texture* > LocalType;
1277 // Reserve some memory inside the message queue
1278 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1280 // Construct message in the message queue memory; note that delete should not be called on the return value
1281 new (slot) LocalType( &manager, &UpdateManager::GenerateMipmaps, &texture );
1285 inline void AddFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer )
1287 typedef MessageValue1< UpdateManager, Render::FrameBuffer* > LocalType;
1289 // Reserve some memory inside the message queue
1290 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1292 // Construct message in the message queue memory; note that delete should not be called on the return value
1293 new (slot) LocalType( &manager, &UpdateManager::AddFrameBuffer, &frameBuffer );
1296 inline void RemoveFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer )
1298 typedef MessageValue1< UpdateManager, Render::FrameBuffer* > LocalType;
1300 // Reserve some memory inside the message queue
1301 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1303 // Construct message in the message queue memory; note that delete should not be called on the return value
1304 new (slot) LocalType( &manager, &UpdateManager::RemoveFrameBuffer, &frameBuffer );
1307 inline void AttachColorTextureToFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer, Render::Texture* texture, unsigned int mipmapLevel, unsigned int layer )
1309 typedef MessageValue4< UpdateManager, Render::FrameBuffer*, Render::Texture*, unsigned int, unsigned int > LocalType;
1311 // Reserve some memory inside the message queue
1312 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1314 // Construct message in the message queue memory; note that delete should not be called on the return value
1315 new (slot) LocalType( &manager, &UpdateManager::AttachColorTextureToFrameBuffer, &frameBuffer, texture, mipmapLevel, layer );
1318 inline void SetDepthIndicesMessage( UpdateManager& manager, OwnerPointer< NodeDepths >& nodeDepths )
1320 typedef MessageValue1< UpdateManager, OwnerPointer< NodeDepths > > LocalType;
1322 // Reserve some memory inside the message queue
1323 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1325 // Construct message in the message queue memory; note that delete should not be called on the return value
1326 new (slot) LocalType( &manager, &UpdateManager::SetDepthIndices, nodeDepths );
1329 inline void AddResetterMessage( UpdateManager& manager, OwnerPointer<PropertyResetterBase> resetter )
1331 typedef MessageValue1< UpdateManager, OwnerPointer<PropertyResetterBase> > LocalType;
1333 // Reserve some memory inside the message queue
1334 unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1336 // Construct message in the message queue memory; note that delete should not be called on the return value
1337 new (slot) LocalType( &manager, &UpdateManager::AddPropertyResetter, resetter );
1341 } // namespace SceneGraph
1343 } // namespace Internal
1347 #endif // DALI_INTERNAL_SCENE_GRAPH_UPDATE_MANAGER_H