X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Fmanager%2Fupdate-manager.h;h=0954733747561f0dde788eede7cc1fa1ea019934;hb=8f612650d20752ab6aba022a9dbefdb883968e8f;hp=419fec321f6cd2dc143254d725dd6036c58e6786;hpb=da8914ee5db2ff91a10c218abdce81ae5e4cd0a3;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 index 419fec3..0954733 100644 --- a/dali/internal/update/manager/update-manager.h +++ b/dali/internal/update/manager/update-manager.h @@ -98,9 +98,7 @@ struct NodeDepthPair struct NodeDepths { - NodeDepths() - { - } + NodeDepths() = default; void Add( SceneGraph::Node* node, uint32_t sortedDepth ) { @@ -146,7 +144,7 @@ public: /** * Destructor. */ - virtual ~UpdateManager(); + ~UpdateManager() override; // Node connection methods @@ -337,7 +335,7 @@ public: * @brief Accept compiled shaders passed back on render thread for saving. * @param[in] shaderData Source code, hash over source, and corresponding compiled binary to be saved. */ - virtual void SaveBinary( Internal::ShaderDataPtr shaderData ); + void SaveBinary( Internal::ShaderDataPtr shaderData ) override; /** * @brief Set the destination for compiled shader binaries to be passed on to. @@ -636,6 +634,12 @@ public: void SetDefaultSurfaceRect( const Rect& 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 ); @@ -646,6 +650,14 @@ public: void SetRenderingBehavior( DevelStage::Rendering renderingBehavior ); /** + * Request to render the current frame + * @note This is a temporary workaround (to be removed in the future) to request the rendering of + * the current frame if the color or visibility of any actor is updated. It MUST NOT be used + * for any other purposes. + */ + void RequestRendering(); + + /** * Sets the depths of all layers. * @param layers The layers in depth order. * @param[in] rootLayer The root layer of the sorted layers. @@ -711,8 +723,9 @@ private: * Perform animation updates * @param[in] bufferIndex to use * @param[in] elapsedSeconds time since last frame + * @return true if at least one animations is currently active or false otherwise */ - void Animate( BufferIndex bufferIndex, float elapsedSeconds ); + bool Animate( BufferIndex bufferIndex, float elapsedSeconds ); /** * Applies constraints to CustomObjects @@ -770,7 +783,7 @@ private: inline void InstallRootMessage( UpdateManager& manager, OwnerPointer& root ) { // Message has ownership of Layer while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -784,7 +797,7 @@ 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; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -796,7 +809,7 @@ inline void UninstallRootMessage( UpdateManager& manager, const Layer* constRoot inline void AddNodeMessage( UpdateManager& manager, OwnerPointer& node ) { // Message has ownership of Node while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -811,7 +824,7 @@ inline void ConnectNodeMessage( UpdateManager& manager, const Node& constParent, Node& parent = const_cast< Node& >( constParent ); Node& child = const_cast< Node& >( constChild ); - typedef MessageValue2< UpdateManager, Node*, Node* > LocalType; + using LocalType = MessageValue2; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -825,7 +838,7 @@ inline void DisconnectNodeMessage( UpdateManager& manager, const Node& constNode // Scene graph thread can modify this object. Node& node = const_cast< Node& >( constNode ); - typedef MessageValue1< UpdateManager, Node* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -839,7 +852,7 @@ inline void DestroyNodeMessage( UpdateManager& manager, const Node& constNode ) // Scene graph thread can destroy this object. Node& node = const_cast< Node& >( constNode ); - typedef MessageValue1< UpdateManager, Node* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -851,7 +864,7 @@ inline void DestroyNodeMessage( UpdateManager& manager, const Node& constNode ) inline void AddCameraMessage( UpdateManager& manager, OwnerPointer< Camera >& camera ) { // Message has ownership of Camera while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer< Camera > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -862,7 +875,7 @@ inline void AddCameraMessage( UpdateManager& manager, OwnerPointer< Camera >& ca inline void RemoveCameraMessage( UpdateManager& manager, const Camera* camera ) { - typedef MessageValue1< UpdateManager, Camera* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -874,7 +887,7 @@ inline void RemoveCameraMessage( UpdateManager& manager, const Camera* camera ) inline void AddObjectMessage( UpdateManager& manager, OwnerPointer& object ) { // Message has ownership of object while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -885,7 +898,7 @@ inline void AddObjectMessage( UpdateManager& manager, OwnerPointer LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -896,7 +909,7 @@ inline void RemoveObjectMessage( UpdateManager& manager, const PropertyOwner* ob inline void AddAnimationMessage( UpdateManager& manager, OwnerPointer< SceneGraph::Animation >& animation ) { - typedef MessageValue1< UpdateManager, OwnerPointer< SceneGraph::Animation > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -910,7 +923,7 @@ inline void StopAnimationMessage( UpdateManager& manager, const Animation& const // The scene-graph thread owns this object so it can safely edit it. Animation& animation = const_cast< Animation& >( constAnimation ); - typedef MessageValue1< UpdateManager, Animation* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -924,7 +937,7 @@ inline void RemoveAnimationMessage( UpdateManager& manager, const Animation& con // The scene-graph thread owns this object so it can safely edit it. Animation& animation = const_cast< Animation& >( constAnimation ); - typedef MessageValue1< UpdateManager, Animation* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -935,7 +948,7 @@ inline void RemoveAnimationMessage( UpdateManager& manager, const Animation& con inline void AddRenderTaskListMessage( UpdateManager& manager, OwnerPointer< SceneGraph::RenderTaskList >& taskList ) { - typedef MessageValue1< UpdateManager, OwnerPointer< SceneGraph::RenderTaskList > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -949,7 +962,7 @@ inline void RemoveRenderTaskListMessage( UpdateManager& manager, const RenderTas // The scene-graph thread owns this object so it can safely edit it. RenderTaskList& taskList = const_cast< RenderTaskList& >( constTaskList ); - typedef MessageValue1< UpdateManager, RenderTaskList* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -960,7 +973,7 @@ inline void RemoveRenderTaskListMessage( UpdateManager& manager, const RenderTas inline void AddSceneMessage( UpdateManager& manager, OwnerPointer< SceneGraph::Scene >& scene ) { - typedef MessageValue1< UpdateManager, OwnerPointer< SceneGraph::Scene > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -974,7 +987,7 @@ inline void RemoveSceneMessage( UpdateManager& manager, const SceneGraph::Scene& // The scene-graph thread owns this object so it can safely edit it. Scene& scene = const_cast< Scene& >( constScene ); - typedef MessageValue1< UpdateManager, Scene* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -986,7 +999,7 @@ inline void RemoveSceneMessage( UpdateManager& manager, const SceneGraph::Scene& inline void AddPropertyNotificationMessage( UpdateManager& manager, OwnerPointer< PropertyNotification >& propertyNotification ) { // Message has ownership of PropertyNotification while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer< PropertyNotification > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1000,7 +1013,7 @@ inline void RemovePropertyNotificationMessage( UpdateManager& manager, const Pro // The scene-graph thread owns this object so it can safely edit it. PropertyNotification& propertyNotification = const_cast< PropertyNotification& >( constPropertyNotification ); - typedef MessageValue1< UpdateManager, PropertyNotification* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1016,7 +1029,7 @@ inline void PropertyNotificationSetNotifyModeMessage( UpdateManager& manager, // The scene-graph thread owns this object so it can safely edit it. PropertyNotification* propertyNotification = const_cast< PropertyNotification* >( constPropertyNotification ); - typedef MessageValue2< UpdateManager, PropertyNotification*, PropertyNotification::NotifyMode > LocalType; + using LocalType = MessageValue2; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1028,7 +1041,7 @@ inline void PropertyNotificationSetNotifyModeMessage( UpdateManager& manager, // The render thread can safely change the Shader inline void AddShaderMessage( UpdateManager& manager, OwnerPointer< Shader >& shader ) { - typedef MessageValue1< UpdateManager, OwnerPointer< Shader > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1040,7 +1053,7 @@ inline void AddShaderMessage( UpdateManager& manager, OwnerPointer< Shader >& sh // The render thread can safely change the Shader inline void RemoveShaderMessage( UpdateManager& manager, const Shader* shader ) { - typedef MessageValue1< UpdateManager, Shader* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1054,7 +1067,7 @@ inline void SetShaderProgramMessage( UpdateManager& manager, Internal::ShaderDataPtr shaderData, bool modifiesGeometry ) { - typedef MessageValue3< UpdateManager, Shader*, Internal::ShaderDataPtr, bool > LocalType; + using LocalType = MessageValue3; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1065,7 +1078,7 @@ inline void SetShaderProgramMessage( UpdateManager& manager, inline void SetDefaultSurfaceRectMessage( UpdateManager& manager, const Rect& rect ) { - typedef MessageValue1< UpdateManager, Rect > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1079,7 +1092,7 @@ inline void SurfaceReplacedMessage( UpdateManager& manager, const SceneGraph::Sc // The scene-graph thread owns this object so it can safely edit it. Scene& scene = const_cast< Scene& >( constScene ); - typedef MessageValue1< UpdateManager, Scene* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1088,9 +1101,20 @@ inline void SurfaceReplacedMessage( UpdateManager& manager, const SceneGraph::Sc new (slot) LocalType( &manager, &UpdateManager::SurfaceReplaced, &scene ); } +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; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1101,7 +1125,7 @@ inline void KeepRenderingMessage( UpdateManager& manager, float durationSeconds inline void SetRenderingBehaviorMessage( UpdateManager& manager, DevelStage::Rendering renderingBehavior ) { - typedef MessageValue1< UpdateManager, DevelStage::Rendering > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1110,6 +1134,17 @@ inline void SetRenderingBehaviorMessage( UpdateManager& manager, DevelStage::Ren new (slot) LocalType( &manager, &UpdateManager::SetRenderingBehavior, renderingBehavior ); } +inline void RequestRenderingMessage( UpdateManager& manager ) +{ + using LocalType = Message; + + // 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::RequestRendering ); +} + /** * Create a message for setting the depth of a layer * @param[in] manager The update manager @@ -1118,7 +1153,7 @@ inline void SetRenderingBehaviorMessage( UpdateManager& manager, DevelStage::Ren */ inline void SetLayerDepthsMessage( UpdateManager& manager, const std::vector< Layer* >& layers, const Layer* rootLayer ) { - typedef MessageValue2< UpdateManager, std::vector< Layer* >, const Layer* > LocalType; + using LocalType = MessageValue2, const Layer*>; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1129,7 +1164,7 @@ inline void SetLayerDepthsMessage( UpdateManager& manager, const std::vector< La inline void AddRendererMessage( UpdateManager& manager, OwnerPointer< Renderer >& object ) { - typedef MessageValue1< UpdateManager, OwnerPointer< Renderer > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1139,7 +1174,7 @@ inline void AddRendererMessage( UpdateManager& manager, OwnerPointer< Renderer > inline void RemoveRendererMessage( UpdateManager& manager, const Renderer& object ) { - typedef MessageValue1< UpdateManager, Renderer* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1150,7 +1185,7 @@ inline void RemoveRendererMessage( UpdateManager& manager, const Renderer& objec // The render thread can safely change the Shader inline void AddTextureSetMessage( UpdateManager& manager, OwnerPointer< TextureSet >& textureSet ) { - typedef MessageValue1< UpdateManager, OwnerPointer< TextureSet > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1162,7 +1197,7 @@ inline void AddTextureSetMessage( UpdateManager& manager, OwnerPointer< TextureS // The render thread can safely change the Shader inline void RemoveTextureSetMessage( UpdateManager& manager, TextureSet& textureSet ) { - typedef MessageValue1< UpdateManager, TextureSet* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1174,7 +1209,7 @@ inline void RemoveTextureSetMessage( UpdateManager& manager, TextureSet& texture inline void AddSamplerMessage( UpdateManager& manager, OwnerPointer< Render::Sampler >& sampler ) { // Message has ownership of Sampler while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer< Render::Sampler > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1185,7 +1220,7 @@ inline void AddSamplerMessage( UpdateManager& manager, OwnerPointer< Render::Sam inline void RemoveSamplerMessage( UpdateManager& manager, Render::Sampler& sampler ) { - typedef MessageValue1< UpdateManager, Render::Sampler* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1196,7 +1231,7 @@ inline void RemoveSamplerMessage( UpdateManager& manager, Render::Sampler& sampl inline void SetFilterModeMessage( UpdateManager& manager, Render::Sampler& sampler, uint32_t minFilterMode, uint32_t magFilterMode ) { - typedef MessageValue3< UpdateManager, Render::Sampler*, uint32_t, uint32_t > LocalType; + using LocalType = MessageValue3; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1207,7 +1242,7 @@ inline void SetFilterModeMessage( UpdateManager& manager, Render::Sampler& sampl inline void SetWrapModeMessage( UpdateManager& manager, Render::Sampler& sampler, uint32_t rWrapMode, uint32_t sWrapMode, uint32_t tWrapMode ) { - typedef MessageValue4< UpdateManager, Render::Sampler*, uint32_t, uint32_t, uint32_t > LocalType; + using LocalType = MessageValue4; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1219,7 +1254,7 @@ inline void SetWrapModeMessage( UpdateManager& manager, Render::Sampler& sampler inline void AddVertexBuffer( UpdateManager& manager, OwnerPointer< Render::VertexBuffer >& vertexBuffer ) { // Message has ownership of vertexBuffer while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer< Render::VertexBuffer > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1230,7 +1265,7 @@ inline void AddVertexBuffer( UpdateManager& manager, OwnerPointer< Render::Verte inline void RemoveVertexBuffer( UpdateManager& manager, Render::VertexBuffer& vertexBuffer ) { - typedef MessageValue1< UpdateManager, Render::VertexBuffer* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1242,7 +1277,7 @@ inline void RemoveVertexBuffer( UpdateManager& manager, Render::VertexBuffer& ve inline void SetVertexBufferFormat( UpdateManager& manager, Render::VertexBuffer& vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format ) { // Message has ownership of VertexBuffer::Format while in transit from event -> update - typedef MessageValue2< UpdateManager, Render::VertexBuffer*, OwnerPointer< Render::VertexBuffer::Format> > LocalType; + using LocalType = MessageValue2 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1254,7 +1289,7 @@ inline void SetVertexBufferFormat( UpdateManager& manager, Render::VertexBuffer& inline void SetVertexBufferData( UpdateManager& manager, Render::VertexBuffer& vertexBuffer, OwnerPointer< Vector >& data, uint32_t size ) { // Message has ownership of VertexBuffer data while in transit from event -> update - typedef MessageValue3< UpdateManager, Render::VertexBuffer*, OwnerPointer< Vector >, uint32_t > LocalType; + using LocalType = MessageValue3 >, uint32_t>; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1266,7 +1301,7 @@ inline void SetVertexBufferData( UpdateManager& manager, Render::VertexBuffer& v inline void AddGeometry( UpdateManager& manager, OwnerPointer< Render::Geometry >& geometry ) { // Message has ownership of Geometry while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer< Render::Geometry > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1277,7 +1312,7 @@ inline void AddGeometry( UpdateManager& manager, OwnerPointer< Render::Geometry inline void RemoveGeometry( UpdateManager& manager, Render::Geometry& geometry ) { - typedef MessageValue1< UpdateManager, Render::Geometry* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1288,7 +1323,7 @@ inline void RemoveGeometry( UpdateManager& manager, Render::Geometry& geometry ) inline void AttachVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::VertexBuffer& vertexBuffer ) { - typedef MessageValue2< UpdateManager, Render::Geometry*, Render::VertexBuffer* > LocalType; + using LocalType = MessageValue2; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1299,7 +1334,7 @@ inline void AttachVertexBufferMessage( UpdateManager& manager, Render::Geometry& inline void RemoveVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::VertexBuffer& vertexBuffer ) { - typedef MessageValue2< UpdateManager, Render::Geometry*, Render::VertexBuffer* > LocalType; + using LocalType = MessageValue2; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1328,14 +1363,12 @@ public: /** * Virtual destructor */ - virtual ~IndexBufferMessage() - { - } + ~IndexBufferMessage() override = default; /** * @copydoc MessageBase::Process */ - virtual void Process( BufferIndex /*bufferIndex*/ ) + void Process( BufferIndex /*bufferIndex*/ ) override { DALI_ASSERT_DEBUG( mManager && "Message does not have an object" ); mManager->SetIndexBuffer( mRenderGeometry, mIndices ); @@ -1350,7 +1383,7 @@ private: inline void SetIndexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, Dali::Vector& indices ) { - typedef IndexBufferMessage< UpdateManager > LocalType; + using LocalType = IndexBufferMessage; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1361,7 +1394,7 @@ inline void SetIndexBufferMessage( UpdateManager& manager, Render::Geometry& geo inline void SetGeometryTypeMessage( UpdateManager& manager, Render::Geometry& geometry, uint32_t geometryType ) { - typedef MessageValue2< UpdateManager, Render::Geometry*, uint32_t > LocalType; + using LocalType = MessageValue2; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1373,7 +1406,7 @@ inline void SetGeometryTypeMessage( UpdateManager& manager, Render::Geometry& ge inline void AddTexture( UpdateManager& manager, OwnerPointer< Render::Texture >& texture ) { // Message has ownership of Texture while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer< Render::Texture > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1384,7 +1417,7 @@ inline void AddTexture( UpdateManager& manager, OwnerPointer< Render::Texture >& inline void RemoveTexture( UpdateManager& manager, Render::Texture& texture ) { - typedef MessageValue1< UpdateManager, Render::Texture* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1395,7 +1428,7 @@ inline void RemoveTexture( UpdateManager& manager, Render::Texture& texture ) inline void UploadTextureMessage( UpdateManager& manager, Render::Texture& texture, PixelDataPtr pixelData, const Texture::UploadParams& params ) { - typedef MessageValue3< UpdateManager, Render::Texture*, PixelDataPtr, Texture::UploadParams > LocalType; + using LocalType = MessageValue3; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1406,7 +1439,7 @@ inline void UploadTextureMessage( UpdateManager& manager, Render::Texture& textu inline void GenerateMipmapsMessage( UpdateManager& manager, Render::Texture& texture ) { - typedef MessageValue1< UpdateManager, Render::Texture* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1418,7 +1451,7 @@ inline void GenerateMipmapsMessage( UpdateManager& manager, Render::Texture& tex inline void AddFrameBuffer( UpdateManager& manager, OwnerPointer< Render::FrameBuffer >& frameBuffer ) { - typedef MessageValue1< UpdateManager, OwnerPointer< Render::FrameBuffer > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1429,7 +1462,7 @@ inline void AddFrameBuffer( UpdateManager& manager, OwnerPointer< Render::FrameB inline void RemoveFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer ) { - typedef MessageValue1< UpdateManager, Render::FrameBuffer* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1440,7 +1473,7 @@ inline void RemoveFrameBuffer( UpdateManager& manager, Render::FrameBuffer& fram inline void AttachColorTextureToFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer, Render::Texture* texture, uint32_t mipmapLevel, uint32_t layer ) { - typedef MessageValue4< UpdateManager, Render::FrameBuffer*, Render::Texture*, uint32_t, uint32_t > LocalType; + using LocalType = MessageValue4; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1451,7 +1484,7 @@ inline void AttachColorTextureToFrameBuffer( UpdateManager& manager, Render::Fra inline void AttachDepthTextureToFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer, Render::Texture* texture, uint32_t mipmapLevel ) { - typedef MessageValue3< UpdateManager, Render::FrameBuffer*, Render::Texture*, uint32_t > LocalType; + using LocalType = MessageValue3; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1462,7 +1495,7 @@ inline void AttachDepthTextureToFrameBuffer( UpdateManager& manager, Render::Fra inline void AttachDepthStencilTextureToFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer, Render::Texture* texture, uint32_t mipmapLevel ) { - typedef MessageValue3< UpdateManager, Render::FrameBuffer*, Render::Texture*, uint32_t > LocalType; + using LocalType = MessageValue3; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1473,7 +1506,7 @@ inline void AttachDepthStencilTextureToFrameBuffer( UpdateManager& manager, Rend inline void SetDepthIndicesMessage( UpdateManager& manager, OwnerPointer< NodeDepths >& nodeDepths ) { - typedef MessageValue1< UpdateManager, OwnerPointer< NodeDepths > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1484,7 +1517,7 @@ inline void SetDepthIndicesMessage( UpdateManager& manager, OwnerPointer< NodeDe inline void AddResetterMessage( UpdateManager& manager, OwnerPointer resetter ) { - typedef MessageValue1< UpdateManager, OwnerPointer > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1495,7 +1528,7 @@ inline void AddResetterMessage( UpdateManager& manager, OwnerPointer& frameCallback, const Node& rootNode ) { - typedef MessageValue2< UpdateManager, OwnerPointer< FrameCallback >, const Node* > LocalType; + using LocalType = MessageValue2, const Node*>; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1506,7 +1539,7 @@ inline void AddFrameCallbackMessage( UpdateManager& manager, OwnerPointer< Frame inline void RemoveFrameCallbackMessage( UpdateManager& manager, FrameCallbackInterface& frameCallback ) { - typedef MessageValue1< UpdateManager, FrameCallbackInterface* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );