* @param[in] renderManager This is responsible for rendering the results of each "update".
* @param[in] renderQueue Used to queue messages for the next render.
* @param[in] renderTaskProcessor Handles RenderTasks and RenderInstrucitons.
+ * @param[in] partialUpdateAvailble whether the partial update is available
*/
UpdateManager( NotificationManager& notificationManager,
CompleteNotificationInterface& animationPlaylist,
Integration::RenderController& controller,
RenderManager& renderManager,
RenderQueue& renderQueue,
- RenderTaskProcessor& renderTaskProcessor );
+ RenderTaskProcessor& renderTaskProcessor,
+ bool partialUpdateAvailable );
/**
* Destructor.
/**
* Installs a new layer as the root node.
- * @pre The UpdateManager does not already have an installed root node.
* @pre The layer is of derived Node type Layer.
* @pre The layer does not have a parent.
* @param[in] layer The new root node.
void InstallRoot( OwnerPointer<Layer>& layer );
/**
+ * Uninstalls the root node.
+ * @pre The layer is of derived Node type Layer.
+ * @pre The layer does not have a parent.
+ * @param[in] layer The root node.
+ * @post The node is owned by UpdateManager.
+ */
+ void UninstallRoot( Layer* layer );
+
+ /**
* Add a Node; UpdateManager takes ownership.
* @pre The node does not have a parent.
* @note even though nodes are pool allocated, they also contain other heap allocated data, thus using OwnerPointer when transferring the data
* @param[in] frameBuffer The framebuffer to add
* The framebuffer will be owned by RenderManager
*/
- void AddFrameBuffer( Render::FrameBuffer* frameBuffer );
+ void AddFrameBuffer( OwnerPointer< Render::FrameBuffer >& frameBuffer );
/**
* Removes a FrameBuffer from the render manager
void SetDefaultSurfaceRect( const Rect<int>& rect );
/**
+ * Set the default surface orientation.
+ * @param[in] orientation The orientation value representing the surface.
+ */
+ void SetDefaultSurfaceOrientation( int orientation );
+
+ /**
* @copydoc Dali::Stage::KeepRendering()
*/
void KeepRendering( float durationSeconds );
new (slot) LocalType( &manager, &UpdateManager::InstallRoot, root );
}
+inline void UninstallRootMessage( UpdateManager& manager, const Layer* constRoot )
+{
+ // Scene graph thread can destroy this object.
+ Layer* root = const_cast< Layer* >( constRoot );
+
+ typedef MessageValue1< UpdateManager, Layer* > LocalType;
+
+ // Reserve some memory inside the message queue
+ uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
+
+ // Construct message in the message queue memory; note that delete should not be called on the return value
+ new (slot) LocalType( &manager, &UpdateManager::UninstallRoot, root );
+}
+
inline void AddNodeMessage( UpdateManager& manager, OwnerPointer<Node>& node )
{
// Message has ownership of Node while in transit from event -> update
new (slot) LocalType( &manager, &UpdateManager::SetDefaultSurfaceRect, rect );
}
+inline void SetDefaultSurfaceOrientationMessage( UpdateManager& manager, int orientation )
+{
+ typedef MessageValue1< UpdateManager, int > LocalType;
+
+ // Reserve some memory inside the message queue
+ unsigned int* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
+
+ // Construct message in the message queue memory; note that delete should not be called on the return value
+ new (slot) LocalType( &manager, &UpdateManager::SetDefaultSurfaceOrientation, orientation );
+}
+
inline void KeepRenderingMessage( UpdateManager& manager, float durationSeconds )
{
typedef MessageValue1< UpdateManager, float > LocalType;
}
-inline void AddFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer )
+inline void AddFrameBuffer( UpdateManager& manager, OwnerPointer< Render::FrameBuffer >& frameBuffer )
{
- typedef MessageValue1< UpdateManager, Render::FrameBuffer* > LocalType;
+ typedef MessageValue1< UpdateManager, OwnerPointer< Render::FrameBuffer > > LocalType;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// Construct message in the message queue memory; note that delete should not be called on the return value
- new (slot) LocalType( &manager, &UpdateManager::AddFrameBuffer, &frameBuffer );
+ new (slot) LocalType( &manager, &UpdateManager::AddFrameBuffer, frameBuffer );
}
inline void RemoveFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer )