X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Fnodes%2Fnode.h;h=71102fba4a8cf38affacd487e3de08a1f1f3abac;hb=0643c768fd100bd7ffb522e3358b88d075bc1d2e;hp=dd1b79ddd71e2dd08f7f37ff6304d80904b99087;hpb=7f980d4fce89b03e0b5f3fe7947fa7b6e840127c;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/update/nodes/node.h b/dali/internal/update/nodes/node.h index dd1b79d..71102fb 100644 --- a/dali/internal/update/nodes/node.h +++ b/dali/internal/update/nodes/node.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_SCENE_GRAPH_NODE_H /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -21,7 +21,6 @@ // INTERNAL INCLUDES #include #include -#include #include #include #include @@ -141,13 +140,14 @@ public: * A value is calculated that can be used during sorting to increase sort speed. * @param[in] clippingId The Clipping ID of the node to set * @param[in] clippingDepth The Clipping Depth of the node to set + * @param[in] scissorDepth The Scissor Clipping Depth of the node to set */ - void SetClippingInformation( const uint32_t clippingId, const uint32_t clippingDepth ) + void SetClippingInformation( const uint32_t clippingId, const uint32_t clippingDepth, const uint32_t scissorDepth ) { - // We only set up the sort value if we have a clipping depth, IE. At least 1 clipping node has been hit. + // We only set up the sort value if we have a stencil clipping depth, IE. At least 1 clipping node has been hit. // If not, if we traverse down a clipping tree and back up, and there is another // node on the parent, this will have a non-zero clipping ID that must be ignored - if( DALI_LIKELY( clippingDepth > 0u ) ) + if( clippingDepth > 0u ) { mClippingDepth = clippingDepth; @@ -162,6 +162,10 @@ public: // If we do not have a clipping depth, then set this to 0 so we do not have a Clipping ID either. mClippingSortModifier = 0u; } + + // The scissor depth does not modify the clipping sort modifier (as scissor clips are 2D only). + // For this reason we can always update the member variable. + mScissorDepth = scissorDepth; } /** @@ -183,6 +187,15 @@ public: } /** + * Gets the Scissor Clipping Depth for this node. + * @return The Scissor Clipping Depth for this node. + */ + uint32_t GetScissorDepth() const + { + return mScissorDepth; + } + + /** * Sets the clipping mode for this node. * @param[in] clippingMode The ClippingMode to set */ @@ -733,7 +746,7 @@ public: /** * @copydoc UniformMap::Add */ - void AddUniformMapping( UniformPropertyMapping* map ); + void AddUniformMapping( OwnerPointer< UniformPropertyMapping >& map ); /** * @copydoc UniformMap::Remove @@ -755,6 +768,11 @@ public: */ void CreateTransform( SceneGraph::TransformManager* transformManager ); + /** + * Reset dirty flags + */ + void ResetDirtyFlags( BufferIndex updateBufferIndex ); + protected: /** @@ -820,11 +838,6 @@ private: Node& operator=(const Node& rhs); /** - * @copydoc Dali::Internal::SceneGraph::PropertyOwner::ResetDefaultProperties() - */ - virtual void ResetDefaultProperties( BufferIndex updateBufferIndex ); - - /** * Recursive helper to disconnect a Node and its children. * Disconnected Nodes have no parent or children. * @param[in] updateBufferIndex The current update buffer index. @@ -866,7 +879,8 @@ protected: CollectedUniformMap mCollectedUniformMap[2]; ///< Uniform maps of the node unsigned int mUniformMapChanged[2]; ///< Records if the uniform map has been altered this frame - uint32_t mClippingDepth; ///< The number of clipping nodes deep this node is + uint32_t mClippingDepth; ///< The number of stencil clipping nodes deep this node is + uint32_t mScissorDepth; ///< The number of scissor clipping nodes deep this node is uint32_t mDepthIndex; ///< Depth index of the node