X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Fmanager%2Fupdate-manager.h;h=d25225ee3d293f82bc003b639126461a6b494c50;hb=b067b6f30c7b8cfdaea9c39f7d2375ccb4e7fa81;hp=72df33cadcec428d09e9cfa4af09abe85232398a;hpb=0b3c34fac06b29c53c88d3f843a3f63f8c446acc;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/update/manager/update-manager.h b/dali/internal/update/manager/update-manager.h old mode 100755 new mode 100644 index 72df33c..d25225e --- a/dali/internal/update/manager/update-manager.h +++ b/dali/internal/update/manager/update-manager.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_SCENE_GRAPH_UPDATE_MANAGER_H /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include // for OwnerPointer< FrameCallback > @@ -132,7 +133,6 @@ public: * @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, @@ -141,8 +141,7 @@ public: Integration::RenderController& controller, RenderManager& renderManager, RenderQueue& renderQueue, - RenderTaskProcessor& renderTaskProcessor, - bool partialUpdateAvailable ); + RenderTaskProcessor& renderTaskProcessor ); /** * Destructor. @@ -240,6 +239,19 @@ public: */ void RemoveRenderTaskList( RenderTaskList* taskList ); + /** + * Add a newly created scene. + * @param[in] scene The scene to add. + * @post The scene is owned by UpdateManager. + */ + void AddScene( OwnerPointer& scene ); + + /** + * Remove a scene. + * @param[in] scene The scene to remove. + */ + void RemoveScene( Scene* scene ); + // Animations /** @@ -578,6 +590,12 @@ public: */ void AttachColorTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, uint32_t mipmapLevel, uint32_t face ); + /** + * This is called when the surface of the scene has been replaced. + * @param[in] scene The scene. + */ + void SurfaceReplaced( Scene* scene ); + public: /** @@ -930,6 +948,31 @@ inline void RemoveRenderTaskListMessage( UpdateManager& manager, const RenderTas new (slot) LocalType( &manager, &UpdateManager::RemoveRenderTaskList, &taskList ); } +inline void AddSceneMessage( UpdateManager& manager, OwnerPointer< SceneGraph::Scene >& scene ) +{ + typedef MessageValue1< UpdateManager, OwnerPointer< SceneGraph::Scene > > 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::AddScene, scene ); +} + +inline void RemoveSceneMessage( UpdateManager& manager, const SceneGraph::Scene& constScene ) +{ + // The scene-graph thread owns this object so it can safely edit it. + Scene& scene = const_cast< Scene& >( constScene ); + + typedef MessageValue1< UpdateManager, Scene* > 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::RemoveScene, &scene ); +} + inline void AddPropertyNotificationMessage( UpdateManager& manager, OwnerPointer< PropertyNotification >& propertyNotification ) { // Message has ownership of PropertyNotification while in transit from event -> update @@ -1021,6 +1064,20 @@ inline void SetDefaultSurfaceRectMessage( UpdateManager& manager, const Rect( constScene ); + + typedef MessageValue1< UpdateManager, Scene* > 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::SurfaceReplaced, &scene ); +} + inline void SetDefaultSurfaceOrientationMessage( UpdateManager& manager, int orientation ) { typedef MessageValue1< UpdateManager, int > LocalType;