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/manager/scene-graph-frame-callback.h> // for OwnerPointer< FrameCallback >
38 #include <dali/internal/update/rendering/scene-graph-renderer.h> // for OwnerPointer< Renderer >
39 #include <dali/internal/update/rendering/scene-graph-texture-set.h> // for OwnerPointer< TextureSet >
40 #include <dali/internal/update/gestures/scene-graph-pan-gesture.h>
41 #include <dali/internal/update/render-tasks/scene-graph-camera.h>
42 #include <dali/internal/render/shaders/scene-graph-shader.h> // for OwnerPointer< Shader >
43 #include <dali/internal/render/renderers/render-property-buffer.h>
44 #include <dali/internal/event/rendering/texture-impl.h>
49 class FrameCallbackInterface;
53 class GlSyncAbstraction;
54 class RenderController;
56 } // namespace Integration
61 class PropertyNotifier;
62 class NotificationManager;
63 class CompleteNotificationInterface;
71 // value types used by messages
72 template <> struct ParameterType< PropertyNotification::NotifyMode >
73 : public BasicType< PropertyNotification::NotifyMode > {};
82 class RenderTaskProcessor;
88 SceneGraph::Node* node;
90 NodeDepthPair( SceneGraph::Node* node, uint32_t sortedDepth )
92 sortedDepth(sortedDepth)
103 void Add( SceneGraph::Node* node, uint32_t sortedDepth )
105 nodeDepths.push_back( NodeDepthPair( node, sortedDepth ) );
108 std::vector<NodeDepthPair> nodeDepths;
113 * UpdateManager maintains a scene graph i.e. a tree of nodes as well as
114 * other scene graph property owning objects.
115 * It controls the Update traversal, in which nodes are repositioned/animated,
116 * and organizes the the culling and rendering of the scene.
117 * It also maintains the lifecycle of nodes and other property owners that are
118 * disconnected from the scene graph.
120 class UpdateManager : public ShaderSaver
125 * Construct a new UpdateManager.
126 * @param[in] notificationManager This should be notified when animations have finished.
127 * @param[in] animationPlaylist The CompleteNotificationInterface that handles the animations
128 * @param[in] propertyNotifier The PropertyNotifier
129 * @param[in] discardQueue Nodes are added here when disconnected from the scene-graph.
130 * @param[in] controller After messages are flushed, we request a render from the RenderController.
131 * @param[in] renderManager This is responsible for rendering the results of each "update".
132 * @param[in] renderQueue Used to queue messages for the next render.
133 * @param[in] renderTaskProcessor Handles RenderTasks and RenderInstrucitons.
135 UpdateManager( NotificationManager& notificationManager,
136 CompleteNotificationInterface& animationPlaylist,
137 PropertyNotifier& propertyNotifier,
138 DiscardQueue& discardQueue,
139 Integration::RenderController& controller,
140 RenderManager& renderManager,
141 RenderQueue& renderQueue,
142 RenderTaskProcessor& renderTaskProcessor );
147 virtual ~UpdateManager();
149 // Node connection methods
152 * Installs a new layer as the root node.
153 * @pre The UpdateManager does not already have an installed root node.
154 * @pre The layer is of derived Node type Layer.
155 * @pre The layer does not have a parent.
156 * @param[in] layer The new root node.
157 * @param[in] systemLevel True if using the system-level overlay.
158 * @post The node is owned by UpdateManager.
160 void InstallRoot( OwnerPointer<Layer>& layer, bool systemLevel );
163 * Add a Node; UpdateManager takes ownership.
164 * @pre The node does not have a parent.
165 * @note even though nodes are pool allocated, they also contain other heap allocated data, thus using OwnerPointer when transferring the data
166 * @param[in] node The node to add.
168 void AddNode( OwnerPointer<Node>& node );
171 * Connect a Node to the scene-graph.
172 * A disconnected Node has has no parent or children, and its properties cannot be animated/constrained.
173 * @pre The node does not already have a parent.
174 * @param[in] parent The new parent node.
176 void ConnectNode( Node* parent, Node* node );
179 * Disconnect a Node from the scene-graph.
180 * A disconnected Node has has no parent or children, and its properties cannot be animated/constrained.
181 * @pre The node has a parent.
182 * @param[in] node The node to disconnect.
184 void DisconnectNode( Node* node );
187 * Destroy a Node owned by UpdateManager.
188 * This is not immediate; Nodes are passed to the RenderQueue to allow GL resources to be deleted.
189 * In the following update, the previously queued Nodes may be deleted.
190 * @pre The node has been disconnected from the scene-graph i.e. has no parent or children.
191 * @param[in] node The node to destroy.
193 void DestroyNode( Node* node );
196 * Add a camera on scene
197 * @param[in] camera The camera to add
199 void AddCamera( OwnerPointer< Camera >& camera );
202 * Remove a camera from scene
203 * @param[in] camera to remove
205 void RemoveCamera( const Camera* camera );
208 * Add a newly created object.
209 * @param[in] object The object to add.
210 * @post The object is owned by UpdateManager.
212 void AddObject( OwnerPointer<PropertyOwner>& object );
216 * @param[in] object The object to remove.
218 void RemoveObject( PropertyOwner* object );
223 * Add a newly created animation.
224 * @param[in] animation The animation to add.
225 * @post The animation is owned by UpdateManager.
227 void AddAnimation( OwnerPointer< SceneGraph::Animation >& animation );
231 * @param[in] animation The animation to stop.
233 void StopAnimation( Animation* animation );
236 * Remove an animation.
237 * @param[in] animation The animation to remove.
239 void RemoveAnimation( Animation* animation );
242 * Query whether any animations are currently running.
243 * @return True if any animations are running.
245 bool IsAnimationRunning() const;
248 * Add a property resetter. UpdateManager takes ownership of the object.
249 * It will be killed by UpdateManager when the associated animator or
250 * constraint has finished; or the property owner of the property is destroyed.
252 void AddPropertyResetter( OwnerPointer<PropertyResetterBase>& propertyResetter );
254 // Property Notification
257 * Add a newly created property notification
258 * @param[in] propertyNotification The notification to add
259 * @post The propertyNotification is owned by UpdateManager.
261 void AddPropertyNotification( OwnerPointer< PropertyNotification >& propertyNotification );
264 * Remove a property notification
265 * @param[in] propertyNotification The notification to remove
267 void RemovePropertyNotification( PropertyNotification* propertyNotification );
270 * Set Notify state for PropertyNotification
271 * @param[in] propertyNotification The notification to remove
272 * @param[in] notifyMode The notification mode.
274 void PropertyNotificationSetNotify( PropertyNotification* propertyNotification, PropertyNotification::NotifyMode notifyMode );
279 * Add a newly created shader.
280 * @param[in] shader The shader to add.
281 * @post The shader is owned by the UpdateManager.
283 void AddShader( OwnerPointer< Shader >& shader );
287 * @pre The shader has been added to the UpdateManager.
288 * @param[in] shader The shader to remove.
289 * @post The shader is destroyed.
291 void RemoveShader( Shader* shader );
294 * Set the shader program for a Shader object
295 * @param[in] shader The shader to modify
296 * @param[in] shaderData Source code, hash over source, and optional compiled binary for the shader program
297 * @param[in] modifiesGeometry True if the vertex shader modifies geometry
299 void SetShaderProgram( Shader* shader, Internal::ShaderDataPtr shaderData, bool modifiesGeometry );
302 * @brief Accept compiled shaders passed back on render thread for saving.
303 * @param[in] shaderData Source code, hash over source, and corresponding compiled binary to be saved.
305 virtual void SaveBinary( Internal::ShaderDataPtr shaderData );
308 * @brief Set the destination for compiled shader binaries to be passed on to.
309 * The dispatcher passed in will be called from the update thread.
310 * @param[in] upstream A sink for ShaderDatas to be passed into.
312 void SetShaderSaver( ShaderSaver& upstream );
317 * Add a new renderer to scene
318 * @param renderer to add
320 void AddRenderer( OwnerPointer< Renderer >& renderer );
323 * Add a renderer from scene
324 * @param renderer to remove
326 void RemoveRenderer( Renderer* renderer );
331 * Set the pan gesture processor.
332 * Pan Gesture processor lives for the lifetime of UpdateManager
333 * @param[in] gesture The gesture processor.
334 * @post The gestureProcessor is owned by the UpdateManager.
336 void SetPanGestureProcessor( PanGesture* gestureProcessor );
341 * Add a newly created TextureSet.
342 * @param[in] textureSet The texture set to add.
343 * @post The TextureSet is owned by the UpdateManager.
345 void AddTextureSet( OwnerPointer< TextureSet >& textureSet );
348 * Remove a TextureSet.
349 * @pre The TextureSet has been added to the UpdateManager.
350 * @param[in] textureSet The TextureSet to remove.
351 * @post The TextureSet is destroyed.
353 void RemoveTextureSet( TextureSet* textureSet );
358 * Get the scene graph side list of RenderTasks.
359 * @param[in] systemLevel True if using the system-level overlay.
360 * @return The list of render tasks
362 RenderTaskList* GetRenderTaskList( bool systemLevel );
364 // Message queue handling
367 * Reserve space for another message in the queue; this must then be initialized by the caller.
368 * The message will be read from the update-thread after the next FlushMessages is called.
369 * @post Calling this method may invalidate any previously returned slots.
370 * @param[in] size The message size with respect to the size of type "char".
371 * @param[in] updateScene A flag, when true denotes that the message will cause the scene-graph node tree to require an update.
372 * @note the default value of updateScene should match that in EventThreadServices::ReserveMessageSlot.
373 * @return A pointer to the first char allocated for the message.
375 uint32_t* ReserveMessageSlot( uint32_t size, bool updateScene = true );
378 * @return the current event-buffer index.
380 BufferIndex GetEventBufferIndex() const
382 // inlined as its called often from event thread
383 return mSceneGraphBuffers.GetEventBufferIndex();
387 * Called by the event-thread to signal that FlushQueue will be called
388 * e.g. when it has finished event processing.
390 void EventProcessingStarted();
393 * Flush the set of messages, which were previously stored with QueueMessage().
394 * Calls to this thread-safe method should be minimized, to avoid thread blocking.
396 * @return True if there are messages to process.
401 * Add a new sampler to RenderManager
402 * @param[in] sampler The sampler to add
403 * @post Sends a message to RenderManager to add the sampler.
404 * The sampler will be owned by RenderManager
406 void AddSampler( OwnerPointer< Render::Sampler >& sampler );
409 * Removes an existing sampler from RenderManager
410 * @param[in] sampler The sampler to remove
411 * @post The sampler will be destroyed in the render thread
413 void RemoveSampler( Render::Sampler* sampler );
416 * Sets the filter modes for an existing sampler
417 * @param[in] sampler The sampler
418 * @param[in] minFilterMode The filter to use under minification
419 * @param[in] magFilterMode The filter to use under magnification
421 void SetFilterMode( Render::Sampler* sampler, uint32_t minFilterMode, uint32_t magFilterMode );
424 * Sets the wrap mode for an existing sampler
425 * @param[in] sampler The sampler
426 * @param[in] rWrapMode Wrapping mode in z direction
427 * @param[in] sWrapMode Wrapping mode in x direction
428 * @param[in] tWrapMode Wrapping mode in y direction
430 void SetWrapMode( Render::Sampler* sampler, uint32_t rWrapMode, uint32_t sWrapMode, uint32_t tWrapMode );
433 * Add a new property buffer to RenderManager
434 * @param[in] propertryBuffer The property buffer to add
435 * @post Sends a message to RenderManager to add the property buffer.
436 * The property buffer will be owned by RenderManager
438 void AddPropertyBuffer( OwnerPointer< Render::PropertyBuffer >& propertryBuffer );
441 * Removes an existing PropertyBuffer from RenderManager
442 * @param[in] propertryBuffer The property buffer to remove
443 * @post The property buffer will be destroyed in the render thread
445 void RemovePropertyBuffer( Render::PropertyBuffer* propertryBuffer );
448 * Sets the format of an existing property buffer
449 * @param[in] propertyBuffer The property buffer.
450 * @param[in] format The new format of the buffer
451 * @post Sends a message to RenderManager to set the new format to the property buffer.
453 void SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format );
456 * Sets the data of an existing property buffer
457 * @param[in] propertyBuffer The property buffer.
458 * @param[in] data The new data of the buffer
459 * @param[in] size The new size of the buffer
460 * @post Sends a message to RenderManager to set the new data to the property buffer.
462 void SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size );
465 * Adds a geometry to the RenderManager
466 * @param[in] geometry The geometry to add
467 * @post Sends a message to RenderManager to add the Geometry
468 * The geometry will be owned by RenderManager
470 void AddGeometry( OwnerPointer< Render::Geometry >& geometry );
473 * Removes an existing Geometry from RenderManager
474 * @param[in] geometry The geometry to remove
475 * @post The geometry will be destroyed in the render thread
477 void RemoveGeometry( Render::Geometry* geometry );
480 * Sets the geometry type of an existing Geometry
481 * @param[in] geometry The geometry
482 * @param[in] geometryType The type of the geometry
484 void SetGeometryType( Render::Geometry* geometry, uint32_t geometryType );
487 * Sets the index buffer to be used by a geometry
488 * @param[in] geometry The geometry
489 * @param[in] indices A vector containing the indices for the geometry
491 void SetIndexBuffer( Render::Geometry* geometry, Dali::Vector<uint16_t>& indices );
494 * Adds a vertex buffer to a geometry
495 * @param[in] geometry The geometry
496 * @param[in] propertyBuffer The property buffer
498 void AttachVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
501 * Removes a vertex buffer from a geometry
502 * @param[in] geometry The geometry
503 * @param[in] propertyBuffer The property buffer
505 void RemoveVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
508 * Adds a texture to the render manager
509 * @param[in] texture The texture to add
510 * The texture will be owned by RenderManager
512 void AddTexture( OwnerPointer< Render::Texture >& texture );
515 * Removes a texture from the render manager
516 * @param[in] texture The texture to remove
517 * @post The texture will be destroyed in the render thread
519 void RemoveTexture( Render::Texture* texture );
522 * Uploads data to a texture owned by the RenderManager
523 * @param[in] texture The texture
524 * @param[in] pixelData The pixel data object
525 * @param[in] params The parameters for the upload
527 void UploadTexture( Render::Texture* texture, PixelDataPtr pixelData, const Texture::UploadParams& params );
530 * Generates mipmaps for a texture owned by the RenderManager
531 * @param[in] texture The texture
533 void GenerateMipmaps( Render::Texture* texture );
536 * Adds a framebuffer to the render manager
537 * @param[in] frameBuffer The framebuffer to add
538 * The framebuffer will be owned by RenderManager
540 void AddFrameBuffer( Render::FrameBuffer* frameBuffer );
543 * Removes a FrameBuffer from the render manager
544 * @param[in] frameBuffer The FrameBuffer to remove
545 * @post The FrameBuffer will be destroyed in the render thread
547 void RemoveFrameBuffer( Render::FrameBuffer* frameBuffer );
550 * Attach a texture as color output to an existing FrameBuffer
551 * @param[in] frameBuffer The FrameBuffer
552 * @param[in] texture The texture that will be used as output when rendering
553 * @param[in] mipmapLevel The mipmap of the texture to be attached
554 * @param[in] layer Indicates which layer of a cube map or array texture to attach. Unused for 2D textures
556 void AttachColorTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, uint32_t mipmapLevel, uint32_t face );
561 * Performs an Update traversal on the scene-graph.
562 * @param[in] elapsedSeconds The elapsed time that should be applied to animations.
563 * @param[in] lastVSyncTimeMilliseconds The last time, in milliseconds, that we had a VSync.
564 * @param[in] nextVSyncTimeMilliseconds The estimated time, in milliseconds, of the next VSync.
565 * @param[in] renderToFboEnabled Whether rendering into the Frame Buffer Object is enabled.
566 * @param[in] isRenderingToFbo Whether this frame is being rendered into the Frame Buffer Object.
567 * @return True if further updates are required e.g. during animations.
569 uint32_t Update( float elapsedSeconds,
570 uint32_t lastVSyncTimeMilliseconds,
571 uint32_t nextVSyncTimeMilliseconds,
572 bool renderToFboEnabled,
573 bool isRenderingToFbo );
576 * Set the background color i.e. the glClear color used at the beginning of each frame.
577 * @param[in] color The new background color.
579 void SetBackgroundColor(const Vector4& color);
582 * Set the default surface rect.
583 * @param[in] rect The rect value representing the surface.
585 void SetDefaultSurfaceRect( const Rect<int>& rect );
588 * @copydoc Dali::Stage::KeepRendering()
590 void KeepRendering( float durationSeconds );
593 * @copydoc Dali::DevelStage::SetRenderingBehavior()
595 void SetRenderingBehavior( DevelStage::Rendering renderingBehavior );
598 * Sets the depths of all layers.
599 * @param layers The layers in depth order.
600 * @param[in] systemLevel True if using the system-level overlay.
602 void SetLayerDepths( const std::vector< Layer* >& layers, bool systemLevel );
605 * Set the depth indices of all nodes (in LayerUI's)
606 * @param[in] nodeDepths A vector of nodes and associated depth indices
608 void SetDepthIndices( OwnerPointer< NodeDepths >& nodeDepths );
611 * Query wheter the default surface rect is changed or not.
612 * @return true if the default surface rect is changed.
614 bool IsDefaultSurfaceRectChanged();
617 * Adds an implementation of the FrameCallbackInterface.
618 * @param[in] frameCallback An OwnerPointer to the SceneGraph FrameCallback object
619 * @param[in] rootNode A pointer to the root node to apply the FrameCallback to
621 void AddFrameCallback( OwnerPointer< FrameCallback >& frameCallback, const Node* rootNode );
624 * Removes the specified implementation of FrameCallbackInterface.
625 * @param[in] frameCallback A pointer to the implementation of the FrameCallbackInterface to remove.
627 void RemoveFrameCallback( FrameCallbackInterface* frameCallback );
632 UpdateManager(const UpdateManager&);
635 UpdateManager& operator=(const UpdateManager& rhs);
638 * Helper to check whether the update-thread should keep going.
639 * @param[in] elapsedSeconds The time in seconds since the previous update.
640 * @return True if the update-thread should keep going.
642 uint32_t KeepUpdatingCheck( float elapsedSeconds ) const;
645 * Helper to reset all Node properties
646 * @param[in] bufferIndex to use
648 void ResetProperties( BufferIndex bufferIndex );
651 * Perform gesture updates.
652 * @param[in] bufferIndex to use
653 * @param[in] lastVSyncTime The last VSync time in milliseconds.
654 * @param[in] nextVSyncTime The estimated time of the next VSync in milliseconds.
655 * @return true, if any properties were updated.
657 bool ProcessGestures( BufferIndex bufferIndex, uint32_t lastVSyncTimeMilliseconds, uint32_t nextVSyncTimeMilliseconds );
660 * Perform animation updates
661 * @param[in] bufferIndex to use
662 * @param[in] elapsedSeconds time since last frame
664 void Animate( BufferIndex bufferIndex, float elapsedSeconds );
667 * Applies constraints to CustomObjects
668 * @param[in] bufferIndex to use
670 void ConstrainCustomObjects( BufferIndex bufferIndex );
673 * Applies constraints to RenderTasks
674 * @param[in] bufferIndex to use
676 void ConstrainRenderTasks( BufferIndex bufferIndex );
679 * Applies constraints to Shaders
680 * @param[in] bufferIndex to use
682 void ConstrainShaders( BufferIndex bufferIndex );
685 * Perform property notification updates
686 * @param[in] bufferIndex to use
688 void ProcessPropertyNotifications( BufferIndex bufferIndex );
691 * Pass shader binaries queued here on to event thread.
693 void ForwardCompiledShadersToEventThread();
696 * Update node shaders, opacity, geometry etc.
697 * @param[in] bufferIndex to use
699 void UpdateNodes( BufferIndex bufferIndex );
703 * @param[in] bufferIndex to use
705 void UpdateRenderers( BufferIndex bufferIndex );
709 // needs to be direct member so that getter for event buffer can be inlined
710 SceneGraphBuffers mSceneGraphBuffers;
717 // Messages for UpdateManager
719 inline void InstallRootMessage( UpdateManager& manager, OwnerPointer<Layer>& root, bool systemLevel )
721 // Message has ownership of Layer while in transit from event -> update
722 typedef MessageValue2< UpdateManager, OwnerPointer<Layer>, bool > LocalType;
724 // Reserve some memory inside the message queue
725 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
727 // Construct message in the message queue memory; note that delete should not be called on the return value
728 new (slot) LocalType( &manager, &UpdateManager::InstallRoot, root, systemLevel );
731 inline void AddNodeMessage( UpdateManager& manager, OwnerPointer<Node>& node )
733 // Message has ownership of Node while in transit from event -> update
734 typedef MessageValue1< UpdateManager, OwnerPointer<Node> > LocalType;
736 // Reserve some memory inside the message queue
737 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
739 // Construct message in the message queue memory; note that delete should not be called on the return value
740 new (slot) LocalType( &manager, &UpdateManager::AddNode, node );
743 inline void ConnectNodeMessage( UpdateManager& manager, const Node& constParent, const Node& constChild )
745 // Update thread can edit the object
746 Node& parent = const_cast< Node& >( constParent );
747 Node& child = const_cast< Node& >( constChild );
749 typedef MessageValue2< UpdateManager, Node*, Node* > LocalType;
751 // Reserve some memory inside the message queue
752 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
754 // Construct message in the message queue memory; note that delete should not be called on the return value
755 new (slot) LocalType( &manager, &UpdateManager::ConnectNode, &parent, &child );
758 inline void DisconnectNodeMessage( UpdateManager& manager, const Node& constNode )
760 // Scene graph thread can modify this object.
761 Node& node = const_cast< Node& >( constNode );
763 typedef MessageValue1< UpdateManager, Node* > LocalType;
765 // Reserve some memory inside the message queue
766 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
768 // Construct message in the message queue memory; note that delete should not be called on the return value
769 new (slot) LocalType( &manager, &UpdateManager::DisconnectNode, &node );
772 inline void DestroyNodeMessage( UpdateManager& manager, const Node& constNode )
774 // Scene graph thread can destroy this object.
775 Node& node = const_cast< Node& >( constNode );
777 typedef MessageValue1< UpdateManager, Node* > LocalType;
779 // Reserve some memory inside the message queue
780 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
782 // Construct message in the message queue memory; note that delete should not be called on the return value
783 new (slot) LocalType( &manager, &UpdateManager::DestroyNode, &node );
786 inline void AddCameraMessage( UpdateManager& manager, OwnerPointer< Camera >& camera )
788 // Message has ownership of Camera while in transit from event -> update
789 typedef MessageValue1< UpdateManager, OwnerPointer< Camera > > LocalType;
791 // Reserve some memory inside the message queue
792 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
794 // Construct message in the message queue memory; note that delete should not be called on the return value
795 new (slot) LocalType( &manager, &UpdateManager::AddCamera, camera );
798 inline void RemoveCameraMessage( UpdateManager& manager, const Camera* camera )
800 typedef MessageValue1< UpdateManager, const Camera* > LocalType;
802 // Reserve some memory inside the message queue
803 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
805 // Construct message in the message queue memory; note that delete should not be called on the return value
806 new (slot) LocalType( &manager, &UpdateManager::RemoveCamera, camera );
809 inline void AddObjectMessage( UpdateManager& manager, OwnerPointer<PropertyOwner>& object )
811 // Message has ownership of object while in transit from event -> update
812 typedef MessageValue1< UpdateManager, OwnerPointer<PropertyOwner> > LocalType;
814 // Reserve some memory inside the message queue
815 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
817 // Construct message in the message queue memory; note that delete should not be called on the return value
818 new (slot) LocalType( &manager, &UpdateManager::AddObject, object );
821 inline void RemoveObjectMessage( UpdateManager& manager, PropertyOwner* object )
823 typedef MessageValue1< UpdateManager, PropertyOwner* > LocalType;
825 // Reserve some memory inside the message queue
826 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
828 // Construct message in the message queue memory; note that delete should not be called on the return value
829 new (slot) LocalType( &manager, &UpdateManager::RemoveObject, object );
832 inline void AddAnimationMessage( UpdateManager& manager, OwnerPointer< SceneGraph::Animation >& animation )
834 typedef MessageValue1< UpdateManager, OwnerPointer< SceneGraph::Animation > > LocalType;
836 // Reserve some memory inside the message queue
837 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
839 // Construct message in the message queue memory; note that delete should not be called on the return value
840 new (slot) LocalType( &manager, &UpdateManager::AddAnimation, animation );
843 inline void StopAnimationMessage( UpdateManager& manager, const Animation& constAnimation )
845 // The scene-graph thread owns this object so it can safely edit it.
846 Animation& animation = const_cast< Animation& >( constAnimation );
848 typedef MessageValue1< UpdateManager, Animation* > LocalType;
850 // Reserve some memory inside the message queue
851 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
853 // Construct message in the message queue memory; note that delete should not be called on the return value
854 new (slot) LocalType( &manager, &UpdateManager::StopAnimation, &animation );
857 inline void RemoveAnimationMessage( UpdateManager& manager, const Animation& constAnimation )
859 // The scene-graph thread owns this object so it can safely edit it.
860 Animation& animation = const_cast< Animation& >( constAnimation );
862 typedef MessageValue1< UpdateManager, Animation* > LocalType;
864 // Reserve some memory inside the message queue
865 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
867 // Construct message in the message queue memory; note that delete should not be called on the return value
868 new (slot) LocalType( &manager, &UpdateManager::RemoveAnimation, &animation );
871 inline void AddPropertyNotificationMessage( UpdateManager& manager, OwnerPointer< PropertyNotification >& propertyNotification )
873 // Message has ownership of PropertyNotification while in transit from event -> update
874 typedef MessageValue1< UpdateManager, OwnerPointer< PropertyNotification > > LocalType;
876 // Reserve some memory inside the message queue
877 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
879 // Construct message in the message queue memory; note that delete should not be called on the return value
880 new (slot) LocalType( &manager, &UpdateManager::AddPropertyNotification, propertyNotification );
883 inline void RemovePropertyNotificationMessage( UpdateManager& manager, const PropertyNotification& constPropertyNotification )
885 // The scene-graph thread owns this object so it can safely edit it.
886 PropertyNotification& propertyNotification = const_cast< PropertyNotification& >( constPropertyNotification );
888 typedef MessageValue1< UpdateManager, PropertyNotification* > LocalType;
890 // Reserve some memory inside the message queue
891 uint32_t* 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::RemovePropertyNotification, &propertyNotification );
897 inline void PropertyNotificationSetNotifyModeMessage( UpdateManager& manager,
898 const PropertyNotification* constPropertyNotification,
899 PropertyNotification::NotifyMode notifyMode )
901 // The scene-graph thread owns this object so it can safely edit it.
902 PropertyNotification* propertyNotification = const_cast< PropertyNotification* >( constPropertyNotification );
904 typedef MessageValue2< UpdateManager, PropertyNotification*, PropertyNotification::NotifyMode > LocalType;
906 // Reserve some memory inside the message queue
907 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
909 // Construct message in the message queue memory; note that delete should not be called on the return value
910 new (slot) LocalType( &manager, &UpdateManager::PropertyNotificationSetNotify, propertyNotification, notifyMode );
913 // The render thread can safely change the Shader
914 inline void AddShaderMessage( UpdateManager& manager, OwnerPointer< Shader >& shader )
916 typedef MessageValue1< UpdateManager, OwnerPointer< Shader > > LocalType;
918 // Reserve some memory inside the message queue
919 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
921 // Construct message in the message queue memory; note that delete should not be called on the return value
922 new (slot) LocalType( &manager, &UpdateManager::AddShader, shader );
925 // The render thread can safely change the Shader
926 inline void RemoveShaderMessage( UpdateManager& manager, Shader& shader )
928 typedef MessageValue1< UpdateManager, Shader* > LocalType;
930 // Reserve some memory inside the message queue
931 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
933 // Construct message in the message queue memory; note that delete should not be called on the return value
934 new (slot) LocalType( &manager, &UpdateManager::RemoveShader, &shader );
937 inline void SetShaderProgramMessage( UpdateManager& manager,
939 Internal::ShaderDataPtr shaderData,
940 bool modifiesGeometry )
942 typedef MessageValue3< UpdateManager, Shader*, Internal::ShaderDataPtr, bool > LocalType;
944 // Reserve some memory inside the message queue
945 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
947 // Construct message in the message queue memory; note that delete should not be called on the return value
948 new (slot) LocalType( &manager, &UpdateManager::SetShaderProgram, &shader, shaderData, modifiesGeometry );
951 inline void SetBackgroundColorMessage( UpdateManager& manager, const Vector4& color )
953 typedef MessageValue1< UpdateManager, Vector4 > LocalType;
955 // Reserve some memory inside the message queue
956 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
958 // Construct message in the message queue memory; note that delete should not be called on the return value
959 new (slot) LocalType( &manager, &UpdateManager::SetBackgroundColor, color );
962 inline void SetDefaultSurfaceRectMessage( UpdateManager& manager, const Rect<int32_t>& rect )
964 typedef MessageValue1< UpdateManager, Rect<int32_t> > LocalType;
966 // Reserve some memory inside the message queue
967 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
969 // Construct message in the message queue memory; note that delete should not be called on the return value
970 new (slot) LocalType( &manager, &UpdateManager::SetDefaultSurfaceRect, rect );
973 inline void KeepRenderingMessage( UpdateManager& manager, float durationSeconds )
975 typedef MessageValue1< UpdateManager, float > LocalType;
977 // Reserve some memory inside the message queue
978 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
980 // Construct message in the message queue memory; note that delete should not be called on the return value
981 new (slot) LocalType( &manager, &UpdateManager::KeepRendering, durationSeconds );
984 inline void SetRenderingBehaviorMessage( UpdateManager& manager, DevelStage::Rendering renderingBehavior )
986 typedef MessageValue1< UpdateManager, DevelStage::Rendering > LocalType;
988 // Reserve some memory inside the message queue
989 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
991 // Construct message in the message queue memory; note that delete should not be called on the return value
992 new (slot) LocalType( &manager, &UpdateManager::SetRenderingBehavior, renderingBehavior );
996 * Create a message for setting the depth of a layer
997 * @param[in] manager The update manager
998 * @param[in] layers list of layers
999 * @param[in] systemLevel True if the layers are added via the SystemOverlay API
1001 inline void SetLayerDepthsMessage( UpdateManager& manager, const std::vector< Layer* >& layers, bool systemLevel )
1003 typedef MessageValue2< UpdateManager, std::vector< Layer* >, bool > LocalType;
1005 // Reserve some memory inside the message queue
1006 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1008 // Construct message in the message queue memory; note that delete should not be called on the return value
1009 new (slot) LocalType( &manager, &UpdateManager::SetLayerDepths, layers, systemLevel );
1012 inline void AddRendererMessage( UpdateManager& manager, OwnerPointer< Renderer >& object )
1014 typedef MessageValue1< UpdateManager, OwnerPointer< Renderer > > LocalType;
1016 // Reserve some memory inside the message queue
1017 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1018 // Construct message in the message queue memory; note that delete should not be called on the return value
1019 new (slot) LocalType( &manager, &UpdateManager::AddRenderer, object );
1022 inline void RemoveRendererMessage( UpdateManager& manager, Renderer& object )
1024 typedef MessageValue1< UpdateManager, Renderer* > LocalType;
1026 // Reserve some memory inside the message queue
1027 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1028 // Construct message in the message queue memory; note that delete should not be called on the return value
1029 new (slot) LocalType( &manager, &UpdateManager::RemoveRenderer, &object );
1032 // The render thread can safely change the Shader
1033 inline void AddTextureSetMessage( UpdateManager& manager, OwnerPointer< TextureSet >& textureSet )
1035 typedef MessageValue1< UpdateManager, OwnerPointer< TextureSet > > LocalType;
1037 // Reserve some memory inside the message queue
1038 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1040 // Construct message in the message queue memory; note that delete should not be called on the return value
1041 new (slot) LocalType( &manager, &UpdateManager::AddTextureSet, textureSet );
1044 // The render thread can safely change the Shader
1045 inline void RemoveTextureSetMessage( UpdateManager& manager, TextureSet& textureSet )
1047 typedef MessageValue1< UpdateManager, TextureSet* > LocalType;
1049 // Reserve some memory inside the message queue
1050 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1052 // Construct message in the message queue memory; note that delete should not be called on the return value
1053 new (slot) LocalType( &manager, &UpdateManager::RemoveTextureSet, &textureSet );
1056 inline void AddSamplerMessage( UpdateManager& manager, OwnerPointer< Render::Sampler >& sampler )
1058 // Message has ownership of Sampler while in transit from event -> update
1059 typedef MessageValue1< UpdateManager, OwnerPointer< Render::Sampler > > LocalType;
1061 // Reserve some memory inside the message queue
1062 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1064 // Construct message in the message queue memory; note that delete should not be called on the return value
1065 new (slot) LocalType( &manager, &UpdateManager::AddSampler, sampler );
1068 inline void RemoveSamplerMessage( UpdateManager& manager, Render::Sampler& sampler )
1070 typedef MessageValue1< UpdateManager, Render::Sampler* > LocalType;
1072 // Reserve some memory inside the message queue
1073 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1075 // Construct message in the message queue memory; note that delete should not be called on the return value
1076 new (slot) LocalType( &manager, &UpdateManager::RemoveSampler, &sampler );
1079 inline void SetFilterModeMessage( UpdateManager& manager, Render::Sampler& sampler, uint32_t minFilterMode, uint32_t magFilterMode )
1081 typedef MessageValue3< UpdateManager, Render::Sampler*, uint32_t, uint32_t > LocalType;
1083 // Reserve some memory inside the message queue
1084 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1086 // Construct message in the message queue memory; note that delete should not be called on the return value
1087 new (slot) LocalType( &manager, &UpdateManager::SetFilterMode, &sampler, minFilterMode, magFilterMode );
1090 inline void SetWrapModeMessage( UpdateManager& manager, Render::Sampler& sampler, uint32_t rWrapMode, uint32_t sWrapMode, uint32_t tWrapMode )
1092 typedef MessageValue4< UpdateManager, Render::Sampler*, uint32_t, uint32_t, uint32_t > LocalType;
1094 // Reserve some memory inside the message queue
1095 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1097 // Construct message in the message queue memory; note that delete should not be called on the return value
1098 new (slot) LocalType( &manager, &UpdateManager::SetWrapMode, &sampler, rWrapMode, sWrapMode, tWrapMode );
1101 inline void AddPropertyBuffer( UpdateManager& manager, OwnerPointer< Render::PropertyBuffer >& propertyBuffer )
1103 // Message has ownership of propertyBuffer while in transit from event -> update
1104 typedef MessageValue1< UpdateManager, OwnerPointer< Render::PropertyBuffer > > LocalType;
1106 // Reserve some memory inside the message queue
1107 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1109 // Construct message in the message queue memory; note that delete should not be called on the return value
1110 new (slot) LocalType( &manager, &UpdateManager::AddPropertyBuffer, propertyBuffer );
1113 inline void RemovePropertyBuffer( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer )
1115 typedef MessageValue1< UpdateManager, Render::PropertyBuffer* > LocalType;
1117 // Reserve some memory inside the message queue
1118 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1120 // Construct message in the message queue memory; note that delete should not be called on the return value
1121 new (slot) LocalType( &manager, &UpdateManager::RemovePropertyBuffer, &propertyBuffer );
1124 inline void SetPropertyBufferFormat( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format )
1126 // Message has ownership of PropertyBuffer::Format while in transit from event -> update
1127 typedef MessageValue2< UpdateManager, Render::PropertyBuffer*, OwnerPointer< Render::PropertyBuffer::Format> > LocalType;
1129 // Reserve some memory inside the message queue
1130 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1132 // Construct message in the message queue memory; note that delete should not be called on the return value
1133 new (slot) LocalType( &manager, &UpdateManager::SetPropertyBufferFormat, &propertyBuffer, format );
1136 inline void SetPropertyBufferData( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
1138 // Message has ownership of PropertyBuffer data while in transit from event -> update
1139 typedef MessageValue3< UpdateManager, Render::PropertyBuffer*, OwnerPointer< Vector<uint8_t> >, uint32_t > LocalType;
1141 // Reserve some memory inside the message queue
1142 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1144 // Construct message in the message queue memory; note that delete should not be called on the return value
1145 new (slot) LocalType( &manager, &UpdateManager::SetPropertyBufferData, &propertyBuffer, data, size );
1148 inline void AddGeometry( UpdateManager& manager, OwnerPointer< Render::Geometry >& geometry )
1150 // Message has ownership of Geometry while in transit from event -> update
1151 typedef MessageValue1< UpdateManager, OwnerPointer< Render::Geometry > > LocalType;
1153 // Reserve some memory inside the message queue
1154 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1156 // Construct message in the message queue memory; note that delete should not be called on the return value
1157 new (slot) LocalType( &manager, &UpdateManager::AddGeometry, geometry );
1160 inline void RemoveGeometry( UpdateManager& manager, Render::Geometry& geometry )
1162 typedef MessageValue1< UpdateManager, Render::Geometry* > LocalType;
1164 // Reserve some memory inside the message queue
1165 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1167 // Construct message in the message queue memory; note that delete should not be called on the return value
1168 new (slot) LocalType( &manager, &UpdateManager::RemoveGeometry, &geometry );
1171 inline void AttachVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::PropertyBuffer& vertexBuffer )
1173 typedef MessageValue2< UpdateManager, Render::Geometry*, Render::PropertyBuffer* > LocalType;
1175 // Reserve some memory inside the message queue
1176 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1178 // Construct message in the message queue memory; note that delete should not be called on the return value
1179 new (slot) LocalType( &manager, &UpdateManager::AttachVertexBuffer, &geometry, const_cast<Render::PropertyBuffer*>(&vertexBuffer) );
1182 inline void RemoveVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::PropertyBuffer& vertexBuffer )
1184 typedef MessageValue2< UpdateManager, Render::Geometry*, Render::PropertyBuffer* > LocalType;
1186 // Reserve some memory inside the message queue
1187 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1189 // Construct message in the message queue memory; note that delete should not be called on the return value
1190 new (slot) LocalType( &manager, &UpdateManager::RemoveVertexBuffer, &geometry, const_cast<Render::PropertyBuffer*>(&vertexBuffer) );
1193 // Custom message type for SetIndexBuffer() used to move data with Vector::Swap()
1194 template< typename T >
1195 class IndexBufferMessage : public MessageBase
1200 * Constructor which does a Vector::Swap()
1202 IndexBufferMessage( T* manager, Render::Geometry* geometry, Dali::Vector<uint16_t>& indices )
1204 mManager( manager ),
1205 mRenderGeometry( geometry )
1207 mIndices.Swap( indices );
1211 * Virtual destructor
1213 virtual ~IndexBufferMessage()
1218 * @copydoc MessageBase::Process
1220 virtual void Process( BufferIndex /*bufferIndex*/ )
1222 DALI_ASSERT_DEBUG( mManager && "Message does not have an object" );
1223 mManager->SetIndexBuffer( mRenderGeometry, mIndices );
1229 Render::Geometry* mRenderGeometry;
1230 Dali::Vector<uint16_t> mIndices;
1233 inline void SetIndexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, Dali::Vector<uint16_t>& indices )
1235 typedef IndexBufferMessage< UpdateManager > LocalType;
1237 // Reserve some memory inside the message queue
1238 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1240 // Construct message in the message queue memory; note that delete should not be called on the return value
1241 new (slot) LocalType( &manager, &geometry, indices );
1244 inline void SetGeometryTypeMessage( UpdateManager& manager, Render::Geometry& geometry, uint32_t geometryType )
1246 typedef MessageValue2< UpdateManager, Render::Geometry*, uint32_t > LocalType;
1248 // Reserve some memory inside the message queue
1249 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1251 // Construct message in the message queue memory; note that delete should not be called on the return value
1252 new (slot) LocalType( &manager, &UpdateManager::SetGeometryType, &geometry, geometryType );
1255 inline void AddTexture( UpdateManager& manager, OwnerPointer< Render::Texture >& texture )
1257 // Message has ownership of Texture while in transit from event -> update
1258 typedef MessageValue1< UpdateManager, OwnerPointer< Render::Texture > > LocalType;
1260 // Reserve some memory inside the message queue
1261 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1263 // Construct message in the message queue memory; note that delete should not be called on the return value
1264 new (slot) LocalType( &manager, &UpdateManager::AddTexture, texture );
1267 inline void RemoveTexture( UpdateManager& manager, Render::Texture& texture )
1269 typedef MessageValue1< UpdateManager, Render::Texture* > LocalType;
1271 // Reserve some memory inside the message queue
1272 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1274 // Construct message in the message queue memory; note that delete should not be called on the return value
1275 new (slot) LocalType( &manager, &UpdateManager::RemoveTexture, &texture );
1278 inline void UploadTextureMessage( UpdateManager& manager, Render::Texture& texture, PixelDataPtr pixelData, const Texture::UploadParams& params )
1280 typedef MessageValue3< UpdateManager, Render::Texture*, PixelDataPtr, Texture::UploadParams > LocalType;
1282 // Reserve some memory inside the message queue
1283 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1285 // Construct message in the message queue memory; note that delete should not be called on the return value
1286 new (slot) LocalType( &manager, &UpdateManager::UploadTexture, &texture, pixelData, params );
1289 inline void GenerateMipmapsMessage( UpdateManager& manager, Render::Texture& texture )
1291 typedef MessageValue1< UpdateManager, Render::Texture* > LocalType;
1293 // Reserve some memory inside the message queue
1294 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1296 // Construct message in the message queue memory; note that delete should not be called on the return value
1297 new (slot) LocalType( &manager, &UpdateManager::GenerateMipmaps, &texture );
1301 inline void AddFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer )
1303 typedef MessageValue1< UpdateManager, Render::FrameBuffer* > LocalType;
1305 // Reserve some memory inside the message queue
1306 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1308 // Construct message in the message queue memory; note that delete should not be called on the return value
1309 new (slot) LocalType( &manager, &UpdateManager::AddFrameBuffer, &frameBuffer );
1312 inline void RemoveFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer )
1314 typedef MessageValue1< UpdateManager, Render::FrameBuffer* > LocalType;
1316 // Reserve some memory inside the message queue
1317 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1319 // Construct message in the message queue memory; note that delete should not be called on the return value
1320 new (slot) LocalType( &manager, &UpdateManager::RemoveFrameBuffer, &frameBuffer );
1323 inline void AttachColorTextureToFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer, Render::Texture* texture, uint32_t mipmapLevel, uint32_t layer )
1325 typedef MessageValue4< UpdateManager, Render::FrameBuffer*, Render::Texture*, uint32_t, uint32_t > LocalType;
1327 // Reserve some memory inside the message queue
1328 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1330 // Construct message in the message queue memory; note that delete should not be called on the return value
1331 new (slot) LocalType( &manager, &UpdateManager::AttachColorTextureToFrameBuffer, &frameBuffer, texture, mipmapLevel, layer );
1334 inline void SetDepthIndicesMessage( UpdateManager& manager, OwnerPointer< NodeDepths >& nodeDepths )
1336 typedef MessageValue1< UpdateManager, OwnerPointer< NodeDepths > > LocalType;
1338 // Reserve some memory inside the message queue
1339 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1341 // Construct message in the message queue memory; note that delete should not be called on the return value
1342 new (slot) LocalType( &manager, &UpdateManager::SetDepthIndices, nodeDepths );
1345 inline void AddResetterMessage( UpdateManager& manager, OwnerPointer<PropertyResetterBase> resetter )
1347 typedef MessageValue1< UpdateManager, OwnerPointer<PropertyResetterBase> > LocalType;
1349 // Reserve some memory inside the message queue
1350 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1352 // Construct message in the message queue memory; note that delete should not be called on the return value
1353 new (slot) LocalType( &manager, &UpdateManager::AddPropertyResetter, resetter );
1356 inline void AddFrameCallbackMessage( UpdateManager& manager, OwnerPointer< FrameCallback >& frameCallback, const Node& rootNode )
1358 typedef MessageValue2< UpdateManager, OwnerPointer< FrameCallback >, const Node* > LocalType;
1360 // Reserve some memory inside the message queue
1361 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1363 // Construct message in the message queue memory; note that delete should not be called on the return value
1364 new (slot) LocalType( &manager, &UpdateManager::AddFrameCallback, frameCallback, &rootNode );
1367 inline void RemoveFrameCallbackMessage( UpdateManager& manager, FrameCallbackInterface& frameCallback )
1369 typedef MessageValue1< UpdateManager, FrameCallbackInterface* > LocalType;
1371 // Reserve some memory inside the message queue
1372 uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
1374 // Construct message in the message queue memory; note that delete should not be called on the return value
1375 new (slot) LocalType( &manager, &UpdateManager::RemoveFrameCallback, &frameCallback );
1378 } // namespace SceneGraph
1380 } // namespace Internal
1384 #endif // DALI_INTERNAL_SCENE_GRAPH_UPDATE_MANAGER_H